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.[1]
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
F0=0
F1=1
Fi=Fi-1+Fi-2.
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.
With the exception of (2) = 3, the Pisano period (n) is always even. A proof of this can be given by observing that (n) is equal to the order of the Fibonacci matrix
Q=\begin{bmatrix}1&1\\1&0\end{bmatrix}
GL2(Zn)
Zn
Zn
Since
F0=0
F1=1
n
F\pi(n)
(F\pi(n)+1-1)
If m and n are coprime, then (mn) is the least common multiple of (m) and (n), by the Chinese remainder theorem. For example, (3) = 8 and (4) = 6 imply (12) = 24. Thus the study of Pisano periods may be reduced to that of Pisano periods of prime powers q = pk, for k ≥ 1.
If p is prime, (pk) divides pk–1 (p). It is unknown if
\pi(pk)=pk-1\pi(p)
So the study of Pisano periods may be further reduced to that of Pisano periods of primes. In this regard, two primes are anomalous. The prime 2 has an odd Pisano period, and the prime 5 has period that is relatively much larger than the Pisano period of any other prime. The periods of powers of these primes are as follows:
From these it follows that if n = 2·5k then (n) = 6n.
The remaining primes all lie in the residue classes
p\equiv\pm1\pmod{10}
p\equiv\pm3\pmod{10}
p\equiv\pm1\pmod{10}
Fp=Z/pZ
If
p\equiv\pm3\pmod{10},
Fp
Fp[x]/(x2-x-1).
x\mapstoxp
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.
The first examples are (10) = 60 and (50) = 300. If n is not of the form 2 · 5r, then (n) ≤ 4n.
The first twelve Pisano periods and their cycles (with spaces before the zeros for readability) are[3] (using hexadecimal cyphers A and B for ten and eleven, respectively):
n | π(n) | number of zeros in the cycle | cycle | OEIS sequence for the cycle | |
---|---|---|---|---|---|
1 | 1 | 1 | 0 | ||
2 | 3 | 1 | 011 | ||
3 | 8 | 2 | 0112 0221 | ||
4 | 6 | 1 | 011231 | ||
5 | 20 | 4 | 01123 03314 04432 02241 | ||
6 | 24 | 2 | 011235213415 055431453251 | ||
7 | 16 | 2 | 01123516 06654261 | ||
8 | 12 | 2 | 011235 055271 | ||
9 | 24 | 2 | 011235843718 088764156281 | ||
10 | 60 | 4 | 011235831459437 077415617853819 099875279651673 033695493257291 | ||
11 | 10 | 1 | 01123582A1 | ||
12 | 24 | 2 | 011235819A75 055A314592B1 |
The first 144 Pisano periods are shown in the following table:
π(n) | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | +9 | +10 | +11 | +12 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0+ | 1 | 3 | 8 | 6 | 20 | 24 | 16 | 12 | 24 | 60 | 10 | 24 | |
12+ | 28 | 48 | 40 | 24 | 36 | 24 | 18 | 60 | 16 | 30 | 48 | 24 | |
24+ | 100 | 84 | 72 | 48 | 14 | 120 | 30 | 48 | 40 | 36 | 80 | 24 | |
36+ | 76 | 18 | 56 | 60 | 40 | 48 | 88 | 30 | 120 | 48 | 32 | 24 | |
48+ | 112 | 300 | 72 | 84 | 108 | 72 | 20 | 48 | 72 | 42 | 58 | 120 | |
60+ | 60 | 30 | 48 | 96 | 140 | 120 | 136 | 36 | 48 | 240 | 70 | 24 | |
72+ | 148 | 228 | 200 | 18 | 80 | 168 | 78 | 120 | 216 | 120 | 168 | 48 | |
84+ | 180 | 264 | 56 | 60 | 44 | 120 | 112 | 48 | 120 | 96 | 180 | 48 | |
96+ | 196 | 336 | 120 | 300 | 50 | 72 | 208 | 84 | 80 | 108 | 72 | 72 | |
108+ | 108 | 60 | 152 | 48 | 76 | 72 | 240 | 42 | 168 | 174 | 144 | 120 | |
120+ | 110 | 60 | 40 | 30 | 500 | 48 | 256 | 192 | 88 | 420 | 130 | 120 | |
132+ | 144 | 408 | 360 | 36 | 276 | 48 | 46 | 240 | 32 | 210 | 140 | 24 |
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.
k | F(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) | |
---|---|---|---|---|
1 | 1 | 1 | 0 | |
2 | 1 | 1 | 0 | |
3 | 2 | 3 | 0, 1, 1 | |
4 | 3 | 8 | 0, 1, 1, 2, (0, 2, 2, 1) | |
5 | 5 | 20 | 0, 1, 1, 2, 3, (0, 3, 3, 1, 4) | |
6 | 8 | 12 | 0, 1, 1, 2, 3, 5, (0, 5, 5, 2, 7, 1) | |
7 | 13 | 28 | 0, 1, 1, 2, 3, 5, 8, (0, 8, 8, 3, 11, 1, 12) | |
8 | 21 | 16 | 0, 1, 1, 2, 3, 5, 8, 13, (0, 13, 13, 5, 18, 2, 20, 1) | |
9 | 34 | 36 | 0, 1, 1, 2, 3, 5, 8, 13, 21, (0, 21, 21, 8, 29, 3, 32, 1, 33) | |
10 | 55 | 20 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, (0, 34, 34, 13, 47, 5, 52, 2, 54, 1) | |
11 | 89 | 44 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, (0, 55, 55, 21, 76, 8, 84, 3, 87, 1, 88) | |
12 | 144 | 24 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, (0, 89, 89, 34, 123, 13, 136, 5, 141, 2, 143, 1) | |
13 | 233 | 52 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 | |
14 | 377 | 28 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 | |
15 | 610 | 60 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377 | |
16 | 987 | 32 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610 | |
17 | 1597 | 68 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987 | |
18 | 2584 | 36 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597 | |
19 | 4181 | 76 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584 | |
20 | 6765 | 40 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181 | |
21 | 10946 | 84 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765 | |
22 | 17711 | 44 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946 | |
23 | 28657 | 92 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711 | |
24 | 46368 | 48 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657 |
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.
k | L(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) | |
---|---|---|---|---|
1 | 1 | 1 | 0 | |
2 | 3 | 8 | 0, 1, (1, 2) | |
3 | 4 | 6 | 0, 1, 1, (2, 3, 1) | |
4 | 7 | 16 | 0, 1, 1, 2, (3, 5, 1, 6) | |
5 | 11 | 10 | 0, 1, 1, 2, 3, (5, 8, 2, 10, 1) | |
6 | 18 | 24 | 0, 1, 1, 2, 3, 5, (8, 13, 3, 16, 1, 17) | |
7 | 29 | 14 | 0, 1, 1, 2, 3, 5, 8, (13, 21, 5, 26, 2, 28, 1) | |
8 | 47 | 32 | 0, 1, 1, 2, 3, 5, 8, 13, (21, 34, 8, 42, 3, 45, 1, 46) | |
9 | 76 | 18 | 0, 1, 1, 2, 3, 5, 8, 13, 21, (34, 55, 13, 68, 5, 73, 2, 75, 1) | |
10 | 123 | 40 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, (55, 89, 21, 110, 8, 118, 3, 121, 1, 122) | |
11 | 199 | 22 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, (89, 144, 34, 178, 13, 191, 5, 196, 2, 198, 1) | |
12 | 322 | 48 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, (144, 233, 55, 288, 21, 309, 8, 317, 3, 320, 1, 321) | |
13 | 521 | 26 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 | |
14 | 843 | 56 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 | |
15 | 1364 | 30 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377 | |
16 | 2207 | 64 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610 | |
17 | 3571 | 34 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987 | |
18 | 5778 | 72 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597 | |
19 | 9349 | 38 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584 | |
20 | 15127 | 80 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181 | |
21 | 24476 | 42 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765 | |
22 | 39603 | 88 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946 | |
23 | 64079 | 46 | 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711 | |
24 | 103682 | 96 | 0, 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.
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.
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
\omega(m)
\alpha(m)
According to Wall's conjecture,
\alpha(pe)=pe-1\alpha(p)
m
m=
e1 | |
p | |
1 |
e2 | |
p | |
2 |
...
en | |
p | |
n |
\alpha(m)=
e1 | |
\operatorname{lcm}(\alpha(p | |
1 |
),
e2 | |
\alpha(p | |
2 |
),...,
en | |
\alpha(p | |
n |
))
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
1, 4, 13, 8, 31, 52, 48, 16, 39, 124, 110, 104, 168, 48, 403, 32, 96, 156, 360, 248, 624, 220, 553, 208, 155, 168, 117, 48, 140, 1612, 331, 64, 1430, 96, 1488, 312, 469, 360, 2184, 496, 560, 624, 308, 440, 1209, 2212, 46, 416, ...
The Pisano periods of Tetranacci numbers (or 4-step Fibonacci numbers) are
1, 5, 26, 10, 312, 130, 342, 20, 78, 1560, 120, 130, 84, 1710, 312, 40, 4912, 390, 6858, 1560, 4446, 120, 12166, 260, 1560, 420, 234, 1710, 280, 1560, 61568, 80, 1560, 24560, 17784, 390, 1368, 34290, 1092, 1560, 240, 22230, 162800, 120, 312, 60830, 103822, 520, ...
See also generalizations of Fibonacci numbers.
Pisano periods can be analyzed using algebraic number theory.
Let
\pik(n)
\pik(m ⋅ n)=lcm(\pik(m),\pik(n))
\pi1(3)=8
\pi1(4)=6,
\pi1(12=3 ⋅ 4)=lcm(\pi1(3),\pi1(4))=lcm(8,6)=24.
q=pn.
n) | |
\pi | |
k(p |
=pn-1 ⋅ \pik(p)
For prime numbers p, these can be analyzed by using Binet's formula:
Fk\left(n\right)=
n} | |
{{\varphi | |
k) |
\over{\sqrt
n | |
{k | |
k |
n | |
-(-1/\varphi | |
k) |
\varphik
\varphik=
k+\sqrt{k2+4 | |
If k2 + 4 is a quadratic residue modulo p (where p > 2 and p does not divide k2 + 4), then
\sqrt{k2+4},1/2,
k/\sqrt{k2+4}
\phi(p)=p-1
n | |
\varphi | |
k |
\phi(p),
For k = 1, this first occurs for p = 11, where 42 = 16 ≡ 5 (mod 11) and 2 · 6 = 12 ≡ 1 (mod 11) and 4 · 3 = 12 ≡ 1 (mod 11) so 4 = , 6 = 1/2 and 1/ = 3, yielding φ = (1 + 4) · 6 = 30 ≡ 8 (mod 11) and the congruence
F1\left(n\right)\equiv3 ⋅ \left(8n-4n\right)\pmod{11}.
Another example, which shows that the period can properly divide p − 1, is π1(29) = 14.
If k2 + 4 is not a quadratic residue modulo p, then Binet's formula is instead defined over the quadratic extension field
(Z/p)[\sqrt{k2+4}]
This analysis fails for p = 2 and p is a divisor of the squarefree part of k2 + 4, since in these cases are zero divisors, so one must be careful in interpreting 1/2 or
\sqrt{k2+4}
One can consider Fibonacci integer sequences and take them modulo n, or put differently, consider Fibonacci sequences in the ring Z/nZ. The period is a divisor of π(n). The number of occurrences of 0 per cycle is 0, 1, 2, or 4. If n is not a prime the cycles include those that are multiples of the cycles for the divisors. For example, for n = 10 the extra cycles include those for n = 2 multiplied by 5, and for n = 5 multiplied by 2.
Table of the extra cycles: (the original Fibonacci cycles are excluded) (using X and E for ten and eleven, respectively)
n | multiples | other cycles | number of cycles (including the original Fibonacci cycles) | |
---|---|---|---|---|
1 | 1 | |||
2 | 0 | 2 | ||
3 | 0 | 2 | ||
4 | 0, 022 | 033213 | 4 | |
5 | 0 | 1342 | 3 | |
6 | 0, 0224 0442, 033 | 4 | ||
7 | 0 | 02246325 05531452, 03362134 04415643 | 4 | |
8 | 0, 022462, 044, 066426 | 033617 077653, 134732574372, 145167541563 | 8 | |
9 | 0, 0336 0663 | 022461786527 077538213472, 044832573145 055167426854 | 5 | |
10 | 0, 02246 06628 08864 04482, 055, 2684 | 134718976392 | 6 | |
11 | 0 | 02246X5492, 0336942683, 044819X874, 055X437X65, 0661784156, 0773X21347, 0885279538, 0997516729, 0XX986391X, 14593, 18964X3257, 28X76 | 14 | |
12 | 0, 02246X42682X 0XX8628X64X2, 033693, 0448 0884, 066, 099639 | 07729E873X1E 0EEX974E3257, 1347E65E437X538E761783E2, 156E5491XE98516718952794 | 10 |
Number of Fibonacci integer cycles mod n are:
1, 2, 2, 4, 3, 4, 4, 8, 5, 6, 14, 10, 7, 8, 12, 16, 9, 16, 22, 16, 29, 28, 12, 30, 13, 14, 14, 22, 63, 24, 34, 32, 39, 34, 30, 58, 19, 86, 32, 52, 43, 58, 22, 78, 39, 46, 70, 102, ...