Puzzle time - the Fibonacci numbers
-
No, the cycle length of Fib mod (2^n) = 3*2^(n-1))
Check Fmod2, Fmod4, Fmod8, Fmod16 etc for their cycle lengths. You’ll get 3,6,12,24,48 etc. I’m wondering if it holds. I think it will.
-
Here's a list of pairs where the first number shows the "n" (but only for powers of 2) and the second one the associated cycle length. Maybe I missunderstood something but your conjecture doesn't seem to hold.
[(2,6),(4,24),(8,60),(16,24),(32,36),(64,120),(128,420),(256,264),(512,516),(1024,72),(2048,600),(4096,1368),(8192,720)]
-
But your original list is this one:
(left side numbering mine, right side list yours)
-
-
It looks like linear relations between the cycle length happen quite frequently. This is a scatter plot of the cycle lengths I computed above (haven't used R in a while - fun for plotting data!). Observe all the dotted lines. The points you identified are on one of those lines. Also interesting to see a few outliers.
I have marked the points you are interested in in red. You see that there are way more points on that line.
-
Interesting.
So it turns out Fibonacci cycle lengths a thing people study. They’re called Pisano numbers and understanding them is really about understanding Pisano numbers for prime powers.
A neat property is that if n and m are coprime then period(mn) is least common multiple of period(n) and period(m).
-
Wait a minute, is that really your graph up there? This is from Wiki