How to Use
Enter modulus m:
- π(m): Pisano period
- Sequence: F(n) mod m
- Pattern: Periodic block
Properties
- π(m) always exists (pigeonhole)
- π(mn) = lcm(π(m),π(n)) when gcd(m,n)=1
- For prime p: π(p) | p²−1
- π(10)=60, so last digits of Fibonacci repeat every 60
Applications
Finding F(n) mod m efficiently: compute n mod π(m), then F(n mod π(m)) mod m. This reduces astronomical Fibonacci index computations to manageable size. Used in competitive programming and cryptography.
Step-by-Step Instructions
- 1Enter modulus m.
- 2Compute π(m).
- 3See Fib mod m.
- 4Verify period.
- 5Use for F(n) mod m.