Prove that: $F(F(n)) \equiv F(F(n) \mathbin{\%} \pi(m)) \bmod m$

52 Views Asked by At

If $F(n)$ is the $n$-th number in a Fibonacci sequence and $\pi(m)$ is a Pisano period of $m$. Proposition: $$F(F(n)) \equiv F(F(n) \mathbin{\%} \pi(m)) \bmod m$$ This is a proposition I encountered while solving a competitive programming problem and I really want to understand/prove it. Since I just started my freshman year in university, I really need a detailed explanation for this one.

1

There are 1 best solutions below

0
On BEST ANSWER

Why, would not this follow from the definition? You have $$F(k)\equiv F(k+\pi(m))\bmod m$$ for any $k$ by the definition of $\pi.$ Then if $F(n) = a\pi(m) + b,\,\,0\leq b<\pi(m):$ $$F(F(n)) = F(a\pi(m)+b)\equiv F(b) = F(F(n)\%\pi(m))\bmod m$$ by your notation.