Explore Pisano periods and Fibonacci cycles effortlessly. Analyze modular arithmetic patterns with detailed visual results. Unlock the hidden rhythm of number sequences today.
| m | π(m) | α(m) | π/m | π even? | Notes |
|---|---|---|---|---|---|
| 2 | 3 | 1 | 1.5 | No | Smallest |
| 3 | 8 | 4 | 2.667 | Yes | π=2(m+1) |
| 4 | 6 | 3 | 1.5 | Yes | 2² |
| 5 | 20 | 5 | 4 | Yes | π=4m |
| 6 | 24 | 12 | 4 | Yes | lcm(π2,π3) |
| 7 | 16 | 8 | 2.286 | Yes | Prime |
| 8 | 12 | 6 | 1.5 | Yes | 2³ |
| 9 | 24 | 12 | 2.667 | Yes | 3² |
| 10 | 60 | 5 | 6 | Yes | Last digit |
| 11 | 10 | 10 | 0.909 | Yes | π=m−1 |
| 12 | 24 | 12 | 2 | Yes | Composite |
| 13 | 7 | 7 | 0.538 | No | Prime |
| 14 | 48 | 7 | 3.429 | Yes | Composite |
| 15 | 40 | 5 | 2.667 | Yes | lcm(π3,π5) |
| 16 | 24 | 12 | 1.5 | Yes | 2⁴ |
| 17 | 36 | 9 | 2.118 | Yes | Prime |
| 18 | 24 | 12 | 1.333 | Yes | 2·3² |
| 19 | 18 | 18 | 0.947 | Yes | Prime |
| 20 | 60 | 5 | 3 | Yes | 4·5 |
| 100 | 300 | 25 | 3 | Yes | 10² |
π(m) = smallest positive k such that F(k) ≡ 0 (mod m) AND F(k+1) ≡ 1 (mod m).
α(m) = smallest k > 0 with F(k) ≡ 0 (mod m). It always divides π(m). For prime p, α(p) divides p−1 or 2(p+1) depending on the Legendre symbol (5|p).
[ F(n+1) ] [ 1 1 ]^n [ 1 ]
[ F(n) ] = [ 1 0 ] * [ 0 ] (mod m)
Step 1: reduce n to n mod pi(m)
Step 2: matrix power via repeated squaring O(log n)
No prime p is known satisfying p² | F(p − (5|p)). The Legendre symbol (5|p) = +1 if p ≡ ±1 (mod 5), −1 if p ≡ ±2 (mod 5), 0 if p = 5.
The Lucas sequence L(n) satisfies the same recurrence F(n+2) = F(n+1) + F(n) but starts at L(0) = 2, L(1) = 1. Its period modulo m also equals π(m), sharing the same Pisano period as Fibonacci.
The Fibonacci sequence is infinite. When you compute it modulo any fixed integer m, the result is finite and periodic. This period is called the Pisano period, denoted π(m). It is named after Leonardo Pisano, better known as Fibonacci. Modulo 5, the sequence 0,1,1,2,3,0,3,3,1,4,0,4,4,3,2,0,2,2,4,1 restarts after 20 terms, so π(5) = 20.
Every modulus m has a rank of apparition α(m): the smallest positive index k at which F(k) ≡ 0 (mod m). It always divides π(m). For example, α(5) = 5 and π(5) = 20. The rank plays a key role in Fibonacci divisibility theory and in testing Fibonacci pseudoprimes.
The Fibonacci recurrence depends only on the two previous terms. Modulo m, each term lies in {0, …, m−1}. There are only m² possible consecutive pairs. By the Pigeonhole Principle, some pair must eventually repeat. Once (0, 1) reappears, the entire sequence restarts from the beginning.
Édouard Lucas studied Fibonacci residues in the 1870s. Donald Wall published the first systematic theory in 1960. Wall conjectured that no prime p satisfies p² | F(p − (p/5)). This remains unproven. Computational searches have verified it for all primes up to approximately 3×1017.
For a prime p, π(p) divides either p−1 or 2(p+1). Which one depends on p modulo 5. If p ≡ ±1 (mod 5), then π(p) | (p−1). If p ≡ ±2 (mod 5), then π(p) | 2(p+1). These rules come from quadratic reciprocity and the factorization of the polynomial x²−x−1 over 𝔽_p.
If gcd(a, b) = 1, then π(a·b) = lcm(π(a), π(b)). Decompose any composite m into coprime prime-power components, compute each period, and combine via LCM. For m = 10 = 2×5: lcm(π(2), π(5)) = lcm(3, 20) = 60 = π(10). This dramatically reduces computation for large m.
Computing F(n) mod m for n = 1018 by iteration is impossible in practice. Instead, reduce n to n mod π(m), then apply 2×2 matrix exponentiation. The result arrives in O(log n) multiplications. This technique is essential in competitive programming, where n can exceed 1018.
The Lucas sequence L(n) satisfies the same recurrence as Fibonacci but starts at L(0)=2, L(1)=1. Both share the same Pisano period π(m) because the period depends only on the recurrence relation, not the initial values. The two sequences are connected: L(n) = F(n−1) + F(n+1). Comparing them modulo m reveals complementary residue patterns.
Plotted sequences modulo m display striking symmetry. For prime m, F(π−k) + F(k) = m, creating a palindromic structure. The heatmap view reveals zero clusters and residue gaps at a glance. Residue frequency charts confirm that each value appears nearly uniformly across the period.
π(m) is the length of the repeating cycle of Fibonacci numbers modulo m. After π(m) steps the sequence returns to (0,1) and restarts. It exists for every positive integer m and is always finite.
Since 10 = 2×5 and gcd(2,5)=1, multiplicativity gives π(10) = lcm(π(2), π(5)) = lcm(3, 20) = 60. This explains why the last digit of Fibonacci numbers repeats every 60 terms exactly.
α(m) is the smallest positive k with F(k) ≡ 0 (mod m). It always divides π(m). For prime p, α(p) equals the first Fibonacci index divisible by p. It is foundational to Fibonacci divisibility theory.
First reduce n to n mod π(m). Then apply 2×2 matrix exponentiation. This gives the answer in O(log n) time, making billion-digit indices tractable within milliseconds on any modern server.
It conjectures no prime p satisfies p² | F(p−(5|p)). Verified computationally up to ~3×1017 but unproven. Finding a counterexample would be one of the most significant discoveries in modern number theory.
Not always. π(2) = 3, which is odd. For all m ≥ 3, the period is even. This follows from the antisymmetric structure of the second half of each Fibonacci period modulo m.
Both satisfy the same recurrence but differ in starting values: F(0)=0, F(1)=1 vs L(0)=2, L(1)=1. They share the same Pisano period π(m). The identity L(n) = F(n−1)+F(n+1) links them algebraically.
φ = (1+√5)/2 satisfies φ² = φ+1. The Pisano period reflects how φ behaves in 𝔽_p. When p splits in ℤ[φ], π(p) | (p−1); when p is inert, π(p) | 2(p+1).
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.