Timeline for Sylvester's sequence
Current License: CC BY-SA 4.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 5, 2021 at 18:03 | history | edited | chunes | CC BY-SA 4.0 | added 5 characters in body |
| Jun 5, 2021 at 18:01 | comment | added | chunes | @9214 You're right. I see what's going on now. From the previous comment, it seemed like 0 is logical false in Red, but we don't need if if we unconditionally return x. Thanks! | |
| Jun 5, 2021 at 17:48 | comment | added | 9214 | @chunes "specially" how? I don't see any check for 0, and 0 is not the same as logical false in the language. func[n][x: 2 loop n[x: x * x - x + 1]x] is enough. | |
| Jun 5, 2021 at 17:46 | comment | added | chunes | @9214 loop 0 is none, so I have to treat an input of 0 specially. | |
| Jun 5, 2021 at 17:38 | comment | added | 9214 | What do you need if for? It will always evaluate its body if n is an integer, which is treated as truthy value. | |
| Jun 5, 2021 at 16:30 | comment | added | chunes | @PedroMaimere Thanks, I'll have to remember that works! | |
| Jun 5, 2021 at 16:29 | history | edited | chunes | CC BY-SA 4.0 | make shorter thanks to Pedo Maimere |
| Jun 5, 2021 at 16:21 | comment | added | Pedro Maimere | n > 0 to n 45 bytes | |
| Jun 5, 2021 at 14:35 | history | edited | chunes | CC BY-SA 4.0 | deleted 6 characters in body |
| Jun 5, 2021 at 13:37 | comment | added | chunes | @GalenIvanov Thanks! | |
| Jun 5, 2021 at 13:36 | history | edited | chunes | CC BY-SA 4.0 | improve thanks to Galen Ivanov |
| Jun 5, 2021 at 8:59 | comment | added | Galen Ivanov | You can use if instead of either and explicitly return x for 49 bytes | |
| Jun 5, 2021 at 6:06 | history | edited | chunes | CC BY-SA 4.0 | deleted 3 characters in body |
| Jun 5, 2021 at 5:56 | history | answered | chunes | CC BY-SA 4.0 |