In number theory, the nth Pisano period, written as (n), is the period with which the sequence of Fibonacci numbers taken modulo n repeats. Pisano periods are named after Leonardo Pisano, better known as Fibonacci. The existence of periodic functions in Fibonacci numbers was noted by Joseph Louis Lagrange in 1774.On Arithmetical functions related to the Fibonacci numbers. Acta Arithmetica XVI (1969). Retrieved 22 September 2011.
Definition
The Fibonacci numbers are the numbers in the integer sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, ... defined by the recurrence relation
For any integer n, the sequence of Fibonacci numbers Fi taken modulo n is periodic. The Pisano period, denoted (n), is the length of the period of this sequence. For example, the sequence of Fibonacci numbers modulo 3 begins: 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, ... This sequence has period 8, so (3) = 8.
Properties Parity With the exception of (2) = 3, the Pisano period (n) is always even.
This follows by observing that (n) is equal to the order of the Fibonacci matrix
in the general linear group of invertible 2 by 2 matrices in the finite ring of integers modulo n. Since Q has determinant −1, the determinant of Q(n) is (−1)(n), which is equal to 1 when either n ≤ 2 or (n) is even.A Theorem on Modular Fibonacci Periodicity. Theorem of the Day (2015). Retrieved 7 January 2016.
Pisano periods of composite numbers If m and n are coprime, then (mn) is the least common multiple of (m) and (n). This follows from Chinese remainder theorem.
Thus the Pisano periods of composite numbers can be computed by looking at the Pisano periods of prime powers q = pk, for k ≥ 1.
If p is prime, (pk) divides pk–1 (p). It is unknown if
for every prime p and integer k > 1. Any prime p providing a counterexample would necessarily be a Wall–Sun–Sun prime, and conversely every Wall–Sun–Sun prime p gives a counterexample (set k = 2).
For p = 2 and 5, the exact values of the Pisano periods are known. The periods of powers of these prime powers are as follows: If n = 2k, then if n = 5k, then
From these it follows that if n = 2k5k then (n) = 6n.
Pisano periods of prime numbers
If prime p is different from 2 and 5, then (p) is a divisor of p2 − 1. This follows from the modulo p analogue of Binet's formula, which implies that (p) is the multiplicative order of a root of modulo p.
Every p other than 2 and 5 lie in the residue classes or .
If , then (p) divides p − 1.
If , then (p) divides 2(p + 1).
The former can be proven by observing that if , then the roots of modulo p belong to (by quadratic reciprocity). Thus their order, (p) is a divisor of p − 1.
To prove the latter, if the roots modulo p of do not belong to (by quadratic reciprocity again), and belong to the finite field As the Frobenius automorphism exchanges these roots, it follows that, denoting them by r and s, we have r p = s, and thus r p+1 = –1. That is r 2(p+1) = 1, and the Pisano period, which is the order of r, is the quotient of 2(p + 1) by an odd divisor.
It follows from above results, that if n = pk is an odd prime power such that (n) > n, then (n)/4 is an integer that is not greater than n. The multiplicative property of Pisano periods imply thus that (n) ≤ 6n, with equality if and only if n = 2 · 5r, for r ≥ 1.
If n is not of the form 2 · 5r, then (n) ≤ 4n.
Tables The first twelve Pisano periods and their cycles (with spaces before the zeros for readability) areGraph of the cycles modulo 1 to 24. Each row of the image represents a different modulo base n, from 1 at the bottom to 24 at the top. The columns represent the Fibonacci numbers mod n, from F(0) mod n at the left to F(59) mod n on the right. In each cell, the brightness indicates the value of the residual, from dark for 0 to near-white for n−1. Blue squares on the left represent the first period; the number of blue squares is the Pisano number. (using A and B for ten and eleven, respectively):
nπ(n)number of zeros in the cycle ()cycle ()OEIS sequence for the cycle11102310113820112 0221461011231520401123 03314 04432 022416242011235213415 055431453251716201123516 066542618122011235 0552719242011235843718 08876415628110604011235831459437 077415617853819 099875279651673 0336954932572911110101123582A112242011235819A75 055A314592B1
The first 144 Pisano periods are shown in the following table:
π(n)+1+2+3+4+5+6+7+8+9+10+11+120+1386202416122460102412+28484024362418601630482424+1008472481412030484036802436+761856604048883012048322448+112300728410872204872425812060+603048961401201363648240702472+1482282001880168781202161201684884+18026456604412011248120961804896+196336120300507220884801087272108+1086015248767224042168174144120120+1106040305004825619288420130120132+1444083603627648462403221014024
Pisano periods of Fibonacci numbers
If n = F(2k) (k ≥ 2), then π(n) = 4k; if n = F(2k + 1) (k ≥ 2), then π(n) = 8k + 4. That is, if the modulo base is a Fibonacci number (≥ 3) with an even index, the period is twice the index and the cycle has two zeros. If the base is a Fibonacci number (≥ 5) with an odd index, the period is four times the index and the cycle has four zeros.
kF(k)π(F(k))first half of cycle (for even k ≥ 4) or first quarter of cycle (for odd k ≥ 4) or all cycle (for k ≤ 3)(with selected second halves or second quarters)111021103230, 1, 14380, 1, 1, 2, (0, 2, 2, 1)55200, 1, 1, 2, 3, (0, 3, 3, 1, 4)68120, 1, 1, 2, 3, 5, (0, 5, 5, 2, 7, 1)713280, 1, 1, 2, 3, 5, 8, (0, 8, 8, 3, 11, 1, 12)821160, 1, 1, 2, 3, 5, 8, 13, (0, 13, 13, 5, 18, 2, 20, 1)934360, 1, 1, 2, 3, 5, 8, 13, 21, (0, 21, 21, 8, 29, 3, 32, 1, 33)1055200, 1, 1, 2, 3, 5, 8, 13, 21, 34, (0, 34, 34, 13, 47, 5, 52, 2, 54, 1)1189440, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, (0, 55, 55, 21, 76, 8, 84, 3, 87, 1, 88)12144240, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, (0, 89, 89, 34, 123, 13, 136, 5, 141, 2, 143, 1)13233520, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 14414377280, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 23315610600, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 37716987320, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610171597680, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987182584360, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597194181760, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584206765400, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 41812110946840, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 67652217711440, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 109462328657920, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 177112446368480, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657
Pisano periods of Lucas numbers If n = L(2k) (k ≥ 1), then π(n) = 8k; if n = L(2k + 1) (k ≥ 1), then π(n) = 4k + 2. That is, if the modulo base is a Lucas number (≥ 3) with an even index, the period is four times the index. If the base is a Lucas number (≥ 4) with an odd index, the period is twice the index.
kL(k)π(L(k))first half of cycle (for odd k ≥ 2) or first quarter of cycle (for even k ≥ 2) or all cycle (for k = 1)(with selected second halves or second quarters)11102380, 1, (1, 2)3460, 1, 1, (2, 3, 1)47160, 1, 1, 2, (3, 5, 1, 6)511100, 1, 1, 2, 3, (5, 8, 2, 10, 1)618240, 1, 1, 2, 3, 5, (8, 13, 3, 16, 1, 17)729140, 1, 1, 2, 3, 5, 8, (13, 21, 5, 26, 2, 28, 1)847320, 1, 1, 2, 3, 5, 8, 13, (21, 34, 8, 42, 3, 45, 1, 46)976180, 1, 1, 2, 3, 5, 8, 13, 21, (34, 55, 13, 68, 5, 73, 2, 75, 1)10123400, 1, 1, 2, 3, 5, 8, 13, 21, 34, (55, 89, 21, 110, 8, 118, 3, 121, 1, 122)11199220, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, (89, 144, 34, 178, 13, 191, 5, 196, 2, 198, 1)12322480, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, (144, 233, 55, 288, 21, 309, 8, 317, 3, 320, 1, 321)13521260, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 14414843560, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233151364300, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377162207640, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610173571340, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987185778720, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597199349380, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 25842015127800, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 41812124476420, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 67652239603880, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 109462364079460, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 1771124103682960, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657
For even k, the cycle has two zeros. For odd k, the cycle has only one zero, and the second half of the cycle, which is of course equal to the part on the left of 0, consists of alternatingly numbers F(2m + 1) and n − F(2m), with m decreasing.
Number of zeros in the cycle
The number of occurrences of 0 per cycle is 1, 2, or 4. Let p be the number after the first 0 after the combination 0, 1. Let the distance between the 0s be q. There is one 0 in a cycle, obviously, if p = 1. This is only possible if q is even or n is 1 or 2. Otherwise there are two 0s in a cycle if p2 ≡ 1. This is only possible if q is even. Otherwise there are four 0s in a cycle. This is the case if q is odd and n is not 1 or 2.
For generalized Fibonacci sequences (satisfying the same recurrence relation, but with other initial values, e.g. the Lucas numbers) the number of occurrences of 0 per cycle is 0, 1, 2, or 4.
The ratio of the Pisano period of n and the number of zeros modulo n in the cycle gives the rank of apparition or Fibonacci entry point of n. That is, smallest index k such that n divides F(k). They are:
1, 3, 4, 6, 5, 12, 8, 6, 12, 15, 10, 12, 7, 24, 20, 12, 9, 12, 18, 30, 8, 30, 24, 12, 25, 21, 36, 24, 14, 60, 30, 24, 20, 9, 40, 12, 19, 18, 28, 30, 20, 24, 44, 30, 60, 24, 16, 12, ...
In Renault's paper the number of zeros is called the "order" of F mod m, denoted , and the "rank of apparition" is called the "rank" and denoted .
According to Wall's conjecture, . If has prime factorization then .
Generalizations The Pisano periods of Lucas numbers are 1, 3, 8, 6, 4, 24, 16, 12, 24, 12, 10, 24, 28, 48, 8, 24, 36, 24, 18, 12, 16, 30, 48, 24, 20, 84, 72, 48, 14, 24, 30, 48, 40, 36, 16, 24, 76, 18, 56, 12, 40, 48, 88, 30, 24, 48, 32, ...
The Pisano periods of Pell numbers (or 2-Fibonacci numbers) are 1, 2, 8, 4, 12, 8, 6, 8, 24, 12, 24, 8, 28, 6, 24, 16, 16, 24, 40, 12, 24, 24, 22, 8, 60, 28, 72, 12, 20, 24, 30, 32, 24, 16, 12, 24, 76, 40, 56, 24, 10, 24, 88, 24, 24, 22, 46, 16, ...
The Pisano periods of 3-Fibonacci numbers are 1, 3, 2, 6, 12, 6, 16, 12, 6, 12, 8, 6, 52, 48, 12, 24, 16, 6, 40, 12, 16, 24, 22, 12, 60, 156, 18, 48, 28, 12, 64, 48, 8, 48, 48, 6, 76, 120, 52, 12, 28, 48, 42, 24, 12, 66, 96, 24, ...
The Pisano periods of Jacobsthal numbers (or (1,2)-Fibonacci numbers) are 1, 1, 6, 2, 4, 6, 6, 2, 18, 4, 10, 6, 12, 6, 12, 2, 8, 18, 18, 4, 6, 10, 22, 6, 20, 12, 54, 6, 28, 12, 10, 2, 30, 8, 12, 18, 36, 18, 12, 4, 20, 6, 14, 10, 36, 22, 46, 6, ...
The Pisano periods of (1,3)-Fibonacci numbers are 1, 3, 1, 6, 24, 3, 24, 6, 3, 24, 120, 6, 156, 24, 24, 12, 16, 3, 90, 24, 24, 120, 22, 6, 120, 156, 9, 24, 28, 24, 240, 24, 120, 48, 24, 6, 171, 90, 156, 24, 336, 24, 42, 120, 24, 66, 736, 12, ...
The Pisano periods of Tribonacci numbers (or 3-step Fibonacci numbers) are