Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

He mentions the also interesting Ulam spiral; http://en.wikipedia.org/wiki/Ulam_spiral

If you like this kind of stuff, you might try to understand the following pattern (F_n is Fibonacci, F_0 = 0, F_1 = 1).

F_n%2==0 whenever n%3==0.

F_n%3==0 whenever n%4==0.

F_n%4==0 whenever n%6==0.

F_n%5==0 whenever n%5==0, etc.



Those are easily understood if you consider F_n mod k.

Ex. F_n mod 2:

1, 1, 0 (as 1+ 1 = 2 == 0 in mod 2), 1, 1, 0, ...

So on and so forth.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: