Can some explain me how the period of Fibonacci mod $1000033$ is $4684$.
As we know if $n$ mod $5$ is $2$ or $3$ then period is $2n + 2$ so the period should me $2\times1000033 + 2$ but why it is $4684$.
Thanks.
Can some explain me how the period of Fibonacci mod $1000033$ is $4684$.
As we know if $n$ mod $5$ is $2$ or $3$ then period is $2n + 2$ so the period should me $2\times1000033 + 2$ but why it is $4684$.
Thanks.
The period is actually $ \pi(n) = k\cdot\text{ord}_n(F_{k+1}) $ where k is the smallest positive integer such that $n\mid F_k$.
So first find the first Fibonacci number where 1000033 divides $F_k$, This happens at $F _{1171}$, so $F_{1171}/1000033$ does not give any remainder when dividing. Every fibonacci number before that does. Thus $k=1171$.
The second part: $\text{ord}_n(F_{k+1})$ is the multiplicative order. You can look that up yourself, but for fibonacci numbers its either 1, 2, or 4. In this case its 4.
(Wolfram Alpha proof: https://www.wolframalpha.com/input/?i=multiplicative+order%28fib%281172%29%2C1000033%29)
So: $1171*4=4684$
I think you are talking about $2*n+2$ with primes. That refers to the fact that all primes "land" on that, but there period can be shorter, meaning $F_{2*1000033+2}\equiv 0 \mod 1000033$. Thus for some primes $F_{2n+2}\equiv 0 \mod 1000033$.
"For p≡±1(mod5) and ±2(mod5) the periods for Fibonacci sequences modulo p divide p−1 and 2p+2 respectively."