A TABLE OF PISANO PERIOD LENGTHS

RICHARD J. MATHAR

Abstract. A Pisano period is the period of an which is obtained by reducing each term of a primary sequence modulo some integer m ≥ 1. Each primary sequence which obeys a linear homogeneous recurrence has such periods for all m ≥ 1. The manuscript tabulates the lengths of these periods indexed by m for a small subset of the OEIS .

1. Variants of the Main Theme The Pisano period is defined as the length of the period of the sequence obtained by reading the Fibonacci sequence [19, A000045] modulo m. The generalized Fi- bonacci sequences have been investigated in similar ways [8,3]. The multivariate linear recurrences [2] might be studied for multivariate moduli.

2. Linear Homogeneous Recurrences 2.1. Definition. We define a class of sequences a(n) which obey a homogeneous linear recurrence of some depth r, and are essentially characterized by the expansion coefficients c in their linear recurrence: Definition 1. (Homogeneous linear recurrence) r X (0) (1) a(n) = ci a(n − i). i=1 It is often advantageous to write this down for the shortest (minimum) r [12, 17, 11, 24]. The basic properties have been thouroughly studied [4, 22, 23,9, 20]. There are connections to solving diophantine equations [14], random number generators [10, 13], primality tests [1] aspects of solving the recurrences [6,7, 16], or transforming other formats to linear recurrences [15, 21]. 2.2. Telescoping. Telescoping by replacing the coefficient a(n − 1) on the right hand side by use of the very same recurrence r X (0) (2) a(n − 1) = ci a(n − 1 − i) i=1 transforms (1) into (3) 1 r r r r X (0) X (0) (0) X (0) X (0) X (1) a(n) = ci a(n−i)+ ci a(n−i) = c1 ci a(n−1−i)+ ci a(n−i) ≡ ci a(n−1−i) i=1 i=2 i=1 i=2 i=1

Date: January 25, 2017. 2010 Mathematics Subject Classification. Primary 11B39; Secondary 93C05. 1 2 RICHARD J. MATHAR

r r−1 X (0) (0) X (0) (4) = ci c1 a(n − 1 − i) + ci+1a(n − 1 − i). i=1 i=1 (We don’t actually care writing down the maximum depth of the telescoping which (1) depends on n being sufficiently large.) This defines constants ci , (1) (0) (0) (0) (5) ci = ci c1 + ci+1 where it’s useful to extend the definition (s) (6) ci ≡ 0, i > r, anys ≥ 0. Iteration of this procedure deepens the order of the recurrence: r X (s) (7) a(n) ≡ ci a(n − s − i). i=1 The constants follow from a multiply-shift operation (s) (s−1) (0) (s−1) (8) ci = c1 ci + ci+1 , s ≥ 1, 1 ≤ i ≤ r, which can be written in format as  (0)  c1 1 0 0 0  (s)  (0)  (s−1)  c  c 0 1 0 0  c 1  2  1  (s)   (0)   (s−1)   c2   c3 0 0 1 0   c2  (9)  .  =  . . . .  ·  .  .  .   ......   .   .   . . . . .   .  (s)  (0)  (s−1) cr  cr−1 0 0 0 1  cr (0) cr 0 0 0 0

(s) Remark 1. Diagonalization of this square matrix would allow to write ci as some (0) matrix power multiplied by ci . The determinant (0) c − λ 1 0 0 0 1 c(0) −λ 1 0 0 2 (0) c3 0 −λ 1 0 (10) ...... (0) cr−1 0 0 −λ 1 (0) cr 0 0 0 −λ r−1 (0) r−1 (0) r−2 (0) r−3 (0) = (−1) [(c1 − λ)λ + c2 λ + c3 λ + ··· + cr ] allows computation of the eigenvalues λ. Up to signs, this equals the companion polynomial f(λ), defined by m m−1 (11) f(x) = x − cm−1x − . . . c0. The recurrence (8) has a markovian property that the r-tuple at step s depends (0) on the values of the previous step and on the values ci that define the recurrence. Because the new values are obtained by multiplication which can be reduced modulo k, a certain vector modulo k is followed uniquely by another vector modulo k; since there is only a finite set of rk different vectors, this reduced vector must reach a state encountered at some previous s within at most rk steps; both conditions PISANO PERIODS 3

(s) combined ensure that the vector ci (modk) with r elements is periodic in the upper index s. Graphically speaking, the vector of r previous values on the right hand side of (1), each reduced modulo some k, defines a point in a cube of edge length k, and computing a(n), also reduced modulo k, is one step of a walk inside that cube. The Pisano periods are closed walks (cycles), and the initial conditions of the a at low indices fix to which of these non-intersecting cycles that walk belongs. Obviously, the number of non-intersecting cycles in that cube of fixed dimesion is limited, so the family of sequences with the same recurrence cofficients ci and different initial values leads to a finite number of Pisano periods.

3. Pisano Periods

The question is: Does a finite period length pk exist such that

(12) a(n + pk) = a(n)(mod k) ∀n ≥ ...? The answer is yes and known [18]. Because for any s (in the telescoped recurrence) r r X (0) X (s) (13) a(n) = ci a(n − i) = ci a(n − i − s) i=1 i=1 we have for all s and k r r X (0) X (s) (14) ci a(n − i) = ci a(n − i − s)(mod k). i=1 i=1

r X (0) (s) (15) [ci a(n − i) − ci a(n − i − s)] = 0 (mod k). i=1

r X (0) (s) (16) [ci (modk)a(n − i)(modk) − ci (modk)a(n − i − s)(modk)] = 0 (mod k). i=1 Insertion of (12) leads to the necessary condition, r X (0) (p) (17) [ci (modk) − ci (modk)]a(n − i)(modk) = 0 (mod k). i=1 which can be tested (in the sense that the following is a certificate for the necessary condition) by applying the condition to each individual term: (0) (p) (18) ci − ci = 0(mod k)∀1 ≤ i ≤ r (Certificate means that satisfying this satisfies the necessary condition, but since the necessary condition is summatory, a dot product of the vector of length r of the c with the subsequence of the actual period build by the a mod k, there are additional ways of satisfying the ncessary condition if the period is providing matching weights. The order of the recurrence r is finite and k is finite, which (0) (p) k means that the r-tupel ci − ci has at most r different values (mod k). Steadily increasing s and testing (0) (s) (19) ci = ci (mod k)∀1 ≤ i ≤ r there can in principle be the following scenarios:

• the tuples ci are aperiodic 4 RICHARD J. MATHAR

• the tuples ci are periodic and the matching condition is fulfilled for s, s+ps, s + 2ps,.. The period mentioned here can either include or not include all the rk different states. Since (19) is sufficient to show periodicity of the an, the periodicity of the ci(s) (mod k) mentioned above ensures that this s defines a Pisano period length (not (s) necessarily the smallest one). The periodicity of the modular ci enforces the periodicity of the modular a(n): We have by definition of the ci:

r X (s) (20) a(n) = ci a(n − i − s); i=1

r X (0) (21) a(n − s) = ci a(n − i − s); i=1 the difference r X (0) (s) (22) a(n − s) − a(n) = [ci − ci ]a(n − i − s); i=1 and modulo variant under the proposition

r X (23) a(n − s) − a(n) = 0 · a(n − i − s)(modk); i=1 q.e.d. (s) The general case is that the initial sets of ci (mod k) are preperiodic (tran- sient) for some small s before entering the period, which replaces (19) by the state condition

(j) (j+s) (24) ci = ci (mod k) ∀1 ≤ i ≤ r, so

X j X j+s (25) a(n) = ci a(n − j − i) = ci a(n − j − s − i). i i Remark 2. If a(n) is a polynomial of degree l with coefficients β, the Pisano period length is limited, as seen by the binomial expansion,

l l l j X X X X j (26) a(n) = β nj ⇒ a(n + k) = β (n + k)j = β ntkj−t j j j t j=0 j=0 j=0 t=0

l j l X X j X (27) a(n + k) ≡ β ntkj−t = β nj = a(n) (mod k), ∴ j t j j=0 t=j j=0 which leads to pk ≤ k. PISANO PERIODS 5

4. Main Table The following table shows Pisano periods for some sequences characterized by their number in the Encyclopedia of Integer Sequenes [19] in the first column, the associated Pisano period length in the same notation in the second column, (0) the coeficients ci in square brackets in the third column (“signature”), and the p1, p2, p3,... for the initial indices in the next square bracket. 2 x x x 1 x x x x x x 1 2 - x 1 - x 1 - x 1 - 2 x 1 + 5 x 1 - 2 x 1 + 2 x 1 + 2 x

6 RICHARD J. MATHAR A122803A015564A083858A026150A087451A015441A002533A000351A015580 [-2] [7,A000225 6] [ [3,A000051 [ 6] 1, [2,A046717 1, [ 2] 1, [1, 1,A077966 1, [ 1, 6] 1, [1, 1,A077957 1, 1, [ 6] 1, 1, [2, 1, 4,A083099 1, 12, [ 5] 1, 1, 1, 1, 1,A015540 1, 12, [ 1, 6, 1, 4, [9, 1, 1,A014551 1, 24, [5] 4] [3, 1, 2, 2, 1, 8, -2] 1, 1,A015521 [ [ 48, [3, 3, 4, 3, 2, 1, [ 1, -2] 1,A001834 12, 1, 20, 1, 4, 1, 15, 1, 1, 4, [ 1, [2, 1, 1,A077959 12,110, 3, 5, 6, 3] 1,168, [0, 1, 4, 24, 1, 2, 2, 6, -2] 1,168,A085750 10, 1, 2, [ 4, 2, 1, [0, 1, 12, 1, 12, 1, 2, [ 8, 24, -2] 1,A021006 3, 1, 12, 1, 12, 2, 6, 1, 4,288, 3, 3, 1, 4, [ 48, [2, 4, 1,A002605 20, 2, 4, 24, 1, 4, 2, 6] 3, 2, A175289 1, 16, 3, 1, 5, 2, 18, 48, [5, 5, 2,A028859 1,144, 4, 1, 6, [ 12,] 6] 2, 1,360, 4,120, 1, 2, 1, 2, 2, 12,] 3, [1, 3,180, 2,A015535 8, 2, 1, 12, [ 12, 1, 2] 4, 2, 24,] 4, 6, 1, 56, 3, [3, 3, 6, 1, 6,A016116 1, 6, 8, [0, [ 24, 1, 4] 2, [4, 3, 20, 0, 6, 1, 9, 1, 2, 4, -1] 10, 1, 2, -2]A077957 1, 4, 8, [ 6, 4, 12, 4, 6, 4,] 5, 1, 4, [ 2, 2, [2, 16, [ 10, 1, 8,288, 2, [-4, 1, 12, 16, 4, 42, 2] 1, 12, -4] 4, 2, 1, 48, 2, 3, 1, 2, 2, 3, 10, 1, 2, 3, 2, [ 18, 6, 12, 18, 1, [ 4, 18, 1, 6, 2, 20,] 1, 2, 2, 2, 7, [2, 4, 1, 8, 3, 4,] 6, 1, 12, 6, 2] 4,] 10, 2, 4, 2, 10, 3, 4, 2, 1, 24, 14, 1, 4, 8, 1, 3, 10, 2, [ 2, 4, 2, 1, 2, 10, 6, 6,360, 2, 3, 24, 12, 1, [2, 3, 4, 2, 4, 12, 1, 6, 3, 12, 6, 2] 2, 16, 60, 3,] 2, 1, 3, 8, 24, 1, 1, 6, [5, 1, 6, 2, 24, 8, 18, 2, [ 12, 20, 2] 6, 2,168, 2, 6, 8, 2, 3, 4, 8, [0, 10, 3, 1, 1, 18, 6, 1, 8, 3, [ 9, 7, 2] 48, 16, 42, 6, 6, 12, 1, 8, 4, 2, 9, [0, 4,] 4, 1, 1, 18, 10, 1, 1,] 24, 16, [ 12, 1, 6, 12, 2] 10, 16, 1, 10, 1,288, 6, 14, 18, 15, 3, 4,] 1, 3, 2, 1, 9, [ 2, 6, 9, 2, 6, 48, 18, 3, 2, 24, 8,] 3, 12, 1, 18, 20, 3, 18, 10, 1, 10, 36, 1, 24, 55, 6, 12,] 1, 4,] 2, 18, 6, 8,] 2, 4, 4, 16, 3, 12, 1, 3, 3,156, 6, 9, 12, 12, 4, 48, 42, 10, 8, 24, 1, 2, 48, 1, 4, 60, 10, 8, 18, 24, 24, 2, 1, 2, 3, 8, 1, 1,136, 48, 3, 6, 2,] 1,144, 9, 8, 9, 4, 12, 4, 27, 8, 24, 9,171, 2, 48, 8, 9,180, 12,] 6, 10, 20,] 6, 24, 18, 6, 24,] 4, 18, 18, 3, 3, 10,] 1,144, 6, 1, 6, 4,] 12, 8,110, 12, 48, 1 9,180, 5, 1, 24, + 6,168, 24,] 12,] 8, 12, x 48, 20, 1,144, 24, 8, 4, 20, 9,180, 4, 24, 24,] 4, 8, 1 6, 24, 3, 8, 6, 45, 1, 8, 8,] 16, 12, 1, 36, 16, 12, 8,] 36, 8,] 1 4 + 3 x 1 - 3 x 1 - x x A000302A141413A003665 [4] [-3] [2, [ 8] [ 1, [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 4, 1, 3, 1, 3, 1, 6, 2, 3, 1, 1, 2, 1, 4, 5, 10, 4, 1, 1, 5, 6, 6, 1, 12, 3, 3, 6, 2, 4, 4, 1, 4, 16, 1, 4, 1, 8, 3, 9, 1, 9, 4,] 9, 2,] 4,] 1 2 x x 1 1 1 x 1 1 1 x x 1 1 x 1 1 1 x 1 + x 1 - x 1 - x 2 - x 1 + 2 x 1 + 2 x x (1 - x) x (1 + 3 x)

PISANO PERIODS 7 A104934A055099A007482A132429A054490A094359A078008A015443 [3,A077917 [-1, 2] -1, [3,A048573 -1] [ 2] [3, [A001045 1, [ 2] A175286 1, 1,A057087 1, [-1, [ [6, 4, 1, 4, -1] 1, 4]A015568 1, 4, 1, [ 4, [ 1,A009545 24, 2, 1, 1, [-1, 1, 4, [1, 4,A090132 24, 4, 2] 4, 48, 1, -2] 1, 1, [1, [1, 4,A108520 24, [ 4, 2] 1, 8] 4, 48, [ 6, 12, 4,A009116 1, 4, [ 24, [ 2, 1, 1, 1, 48, 30, 12, [1, 1, 4, 1,A099087 1, 6, 24, 1, 4, 2, 2] 4, 30, 12, 6, 4, 1, 12, 1, 4,A078069 6, 6, 24, [ 48, 4, 30, 1, 4, 6, 24, 6, 3, [4, 12, 1, 6,A015537 1, 4] 48, 24, [7, 4, 4, 4, 2, 1,272, 1, 2, 24, 2, 10] 12, 1,A006495 12, 24, 12, [ 6, 18, 48, 6, [2, 4, 4, 18, 2,272, 48, [ 24, 6, -2] 24,] 6, [-2,A063727 6, 1, 12, 4, 6, 4, 6, 16, -2] 12, 18, 1, 10, 1, 4,272, 2, [ 1, 24,] 18, [-2,A072265 12, 2, 4, 6, 1, [ 4, 24, -2] 6, 1, 18, 2, 18, 1, 14, 8, 12, 24,] [-2,A006131 4, 2, 6, 1, 5, [ 8, 6, -2] 4, 1, 18, 24,110, 3, 1, 6, 10, 4,A164539 1, 12, 6, 1, 12, 1, 6, [ 8, 4, [2, 6, 3, 12, 6, 4, 10, -2] 56, 8, 2, [-2,A006012 48, 1, 2, 4, 2, 1, 12, 1, 16, 8, -2] 24, 18, 4, 6, [ 24, 1, 8, 8, 8, 8,A007070 1, 6, 4, 12, 12, 6, [ 1,144, 18, 12, 2, 12, 4, 1, 2, 4, 20, 18,180, 1, 18, [5, 10, 8, 8,A090591 6, 16, 1, 1, 24,] 1, 4] 2, 24, [2, 4,] 12, 1, 8, 6,] 24, 4, 4,] 24, 6, 1, -5] 6, 24,A078020 1, [ 12, 8, 1, 2, 8, 60, 3,120, 8, 4, 4, 18, 24, [ 24,] 1, [2, 8, 24, 1, 6, 18, 8, 1, 24, 4] 8, 5, 8, 4, 1, 18, 21, 1, 1, [1, 1, 6, 24, 4,] 40, 18, 4, 4, [ 24, 4] 8, 1, 40, 6, 4, 21, 8, 2, 1, [1, 8, 4,] 8, 1, 24, 4, [ 12, 24, 4] 12, 8, 24, 8, 8, 40, 1, 8, 24, [2, 12, 1, 1, 24, 1, 8, 18, 4, [ 1, 1, 7] 24, 16, [4, 8, 4, 18, 40, 8, 24, 8, 24,360, 1, -2] 12, 1, 1, 1, 4, [ 8, 24, 24, 16, 8, [4, 2,] 8, 1, 4, 1, 3,] [ 8, 24, 48, -2] 12, 1, 16, 8, 40, 1, 1, 4, 8, 45, 24, 24, 48, [2, 16, 5, 40, 1, 1, 1, [ 8, 72, -8] 8, 1, 24, 1, 4,] 24, 8, 4, 12, 72, 8, [1, 8, 1, 16, 6, 1, 1, 4,] 24, [ 24, 8, 48, -2] 12, 24, 4, 1, 4,] 24, 8, 72, 8, 40, 1, 16, 6, 4, 1, 8, 1, 1, [ 48, 24, 60, 24, 24, 8, 1, 4,] 8, 8, 72, 8, 1, 1, 1, 24, 2, 42, 48, 8, 16, 8, 5, 1, 24, 48, 1, 4,] 12, 8, 24, 10, 1, 16, 8, 24, 2, 48, 72, 3, 24, 6,120, 8, 24, 1, 8, 8, 72, 6, 8, 8, 24, 4,] 2, 42, 8, 2, 6,120, 24, 48, 1, 4,] 1, 12, 72, 6, 8, 8, 24, 40, 24, 24, 48, 24,360, 8, 16, 15, 24,120, 24, 1, 12, 24, 7, 1, 8, 4,] 24, 48, 90, 8,168, 72, 21, 8,168, 4, 24,120, 24, 1, 24, 4,] 24, 3, 18, 2, 6, 8, 8,168, 4,136, 24, 24, 24, 24, 24, 24, 10, 5,] 24, 18, 6, 18, 2, 10, 1, 24, 8, 6,] 6,] 56, 4, 8,168, 8, 1, 24,120, 21, 24,360, 7, 24,] 24, 24,] 8, 24, 24,360, 2,144, 24,] 1,144, 24,360, 2 24,120, 24,] + 24,] x 2 - 2 x + 3 x x A015584 [9, 8] [ 1, 1, 4, 1, 24, 4, 6, 1, 4, 24, 10, 4, 12, 6, 24, 1,144, 4, 15, 24,] 2 1 x 1 x 1 x x x x x x 1 x 1 + x 1 + 4 x 1 + x 1 - x 1 + 3 x 1 + 2 x (1 + x) (2 x - 1)

8 RICHARD J. MATHAR A001607A099843A107920A006355A123335A048694A001333 [-1,A077974 -2]A001644 [ [-4, A106293 1]A000213 1, [1, [ -2]A003462 1, 1, [ [1, 8,A014983 1] [-2, 1, [1, 1, 1, 1] 1,A015591 [ 24, 8, 1] 1, [-1, [ [2,A038754 1, 8, 0, 2, [ 1] 8, 42, -2] 1, 20, [2, 1,A015530 1, [ 2, 1] 2, [ 1, 8, 24, 8, 24, 16, 1,A000034 1, [ 24, 1, 8, 13, A130130 8, [1, 3, 10, 4, 1, 21, 1,A001075 1, 20, 1, 4, 4, 1] 8,168, 13, 12, 8, 31, 8, 2, 1, 8,A015518 42, 20, 13, 24, [ 16, [4, 24, 1,124, 8, 10, 48, 4, 24, 8, -3] 13,A015574 12, 10, 1, 6, 4,144, 48, 6, [-2, 8, 8, 4, 24, [ 24,360, 3] 28, 39, 8,A005668 8,168, 1, 12, 20, 24,] 2, 4, 16, 31, [10, A175185 21, 13, 10, 1, 39,124,665, 24, [ 40, 10, [0, 6, 9] 24, 8,A015575 24, 13,2196, 12, 52,168, 1] 4, 28, 2, 48,1612, 24, 1, 8, 48,403, 4, [ 4,144, 31, 6, [0, 16,A000290 12, 16, [ 24, 24,360, 13, 3] 40, 1, 4, A186646 8, 2, 96, 12, 1, 24,] 48, 4, 12, 72, [4, 28, 8, 39,360,124,] 1,A002532 24, 24, [ 36, 2, 39, 3] 1, 2, 8, 12, 24, 18,124,] 6, 6, 2, 8, 39,A000578 24, 1, 18, 4, [ 24, 4, 20,] 28, 1, 31,110, [4, 60,] 2, [6, 52,168, -1] 8, 2, 2,A125905 1, [3, 8, 4, 6, 4, 1] 48,403, 28, -3, 16, 2, 24, 16, [ 1, 6, [2, 2, 1] 24, 2,A125905 4, [ 96, 6, 3] 40, 2, 8, 39,360,124,] 1, 24, 4, 4, 1, [ 12,] 3, [8, 16, 2, 1,A015551 [ 3] 2, 24, 48, 2, 8, 8, 1, 4, 1, 8, 40, 2, 16,A056594 1, 24, [ 2, 12,] 8, 2, [4, 24, 2, 4, 2, 1, 2, -6, 40, 12, [8, 2, 2,A015531 1, 2, 1, 4, 4, 12,] 5] 5, 21, 3, 4, 4, -1] 4, 2, 10, 2, 2, 4, 20, 3, [ 2, 4, 2, 10, [ 1, 4, 4, 2, 2, [2, 2, 2, 1, 3, 3, 5, 5] 4, 16, 1, 8, 4, 24, 6, 4, 2, 84, 8, 10, 2, 6, [-4, 40, 6, [ 48, 8, 2, 2, -1] 6, 4, 2, 4, 4, 3, 4, 4, 7, [-4, 1, 4, 6, 3, 6, [ 84, 4, 2, -1] 2, 16,272, 20, 6, 6, 2, 8, 42, 4, 16, 24, 2, 24, 4, 12, 16, 8, 1, 24, 16, [ 2, 2,360, 6, 4, 9, 4, 3, 4, [6, 10, 5, 8, 2, 2, 2, 8,288, 10, 2, 1, 2, 4,] 5] 6, [0, 18, 11, 6, 4, 6, 4, 6, 8, 21, -1] 4, 3, 6, 9, 2, 2, 16, [ 12, 32, 4,] 10, 18, 6, 4,120, 4, 20, 7, 4, [ 4, 24,] 13, [4, 4,] 3, 2, 16, 1, 8, 2, 4, 14, 5] 4, 6, 36, 8, 36, 9, 1, 6, 15, 84, 4, 2, 24, 2, 6, 6, [ 24, 6, 3, 8,] 4,120, 2, 6, 1 8, 6, 2, 8, 4, 8, 10, 6, 17, 1, 4, 8, 18, 11, 6, 4, 8, 18, 6, 2,] 3, 20,] 4, 12, 56, 4, 19, 2, 8, x 6, 13, 42, 4, 16, 4, 10,] 16, 8, 4,120, 1, 14, 12, 16, 6, 12, 5, 15, 4, 9, 6,171, 4, 56, 4, 12,] 16, 8, 2, 2, 24, 42, x 17, 16, 4, 3 18, 6, 4,] 9, 12, (1 18,360, - 2, 16,288, 8, + 6, 4, x 4,] 5, 6, 12, x) 19, 4,] 12, 6, 6, 20,] 4, 12, 5, 18, 2, 6, 12, 10, 4, 8, 12, 4,] 4, 1 4, 4, 6, 18, 8, + 12, 3 42, 1 4, 8, 2, 6, x + 10, 4, 4 4, 9, 8, 16, x 18, 6, 96, 4, 10, 9, 12,360, 12,] 4, 18, 4, 10, 4,] 6, 12,] 4, 6, 4, 8, 4, 16, 18, 4, 18, 4, 2,] 4,] x x 2 A110512 [-1, -2] [ 1, 1, 8, 1, 24, 8, 42, 1, 24, 24, 10, 8,168, 42, 24, 2,144, 24,360, 24,] x 2 x x x x 1 1 + x 1 - x 1 + x 1 - x 1 + 11 x 2 - 3 x 2 - 32 x - 3 x x (1 + x)

PISANO PERIODS 9 A038608A181983A001076 A175183A015532A174191A077985A000129 A175181 [4, [-2,A048693 1] -1] [-2,A015576 [ [ -1] 1,A015519 1, [ [3, 2,A001590 2, -1, 1, -1] 8, [2, [4, 6,A061347 2, 1] 7] [ 2, 4, 6,A030195 20, [ [ 10, 1, [-2, A175290 4, 1] 8, 1,A106852 1, 6, 2, 10, 16, 14, [ 2, 2,A122994 8, 6, 4, 8, 14, 1, 8, 8, 18, [2, 4,A003688 8, 10, 1] 12, 8, 2, 20, 4, 4, 22, 18, [8, 10,A022086 12, 12, [ 8, 10, 7] 8, 4, [1, 26, 22, [3, 8, [2, 8, 1,A057681 14, 1, 6, 12, [ 4, 3] 28, 7] 8, 1] 30, 26, 12, 16, 6, 16, 2, 8, [-1,A052533 14, 1, [ 40, [ 3, [ 34, 24, -1] 30, 8, 8, 18, 8, 12, 16, 2, 1,A105476 8, 1, 24, 4, 1, 38, 24, [ 34, 6, 12, 12, 24, 20,] 4, 18, 8, 3, 2, 24,A006138 2, 12, 8, 1, 38, 8, 8, [1, 4,110, 13, 28, 20,] 4, 24, 1, 8, 8, -3] 8,A006130 3, 24, 12, 6, 28, 8,168, 8, A175291 6, 24, 3, 20,] 4, [ 31, 6, [1, 24, 1, 8,A214733 24, 6, 6, 26, 9] 16, 8, 4, 24, 1, 48, 8, 16, 3, 1, [3, 28, 8,A057079 16, 8, 16, 24, [ 24, 1] 3, 16, 3, 39, 12, 40, 3, 4, 6, 42, 3, [1, 24, 8,288, 62,110,104,168,A006190 24, 1, 12,] 24, [ 24, 1] 40, 1, 24, 48,403, [3, A175182 3, 24, 16, 6, 8, 12,] 18, 32, -3] 8, 3,A049347 1, 16, 24, [ 6, 96, 28, 3, 5, 24, 1, 24, 4,] 78,360,248,] [ 1, [1, [1, 3, 40, 12,120,A057088 15, 1, 4, 6, 3] 3, 3] 8, 12,] 1, 24, 6, 12, 1, 3, [1, 8,168, 3, 3,A002878 16, [ 3, [ 84, 3] 48, 3, 16, 6, 2, 6, 42, 6, 1, 12, [1, 24, 1,A005248 3, 1, 24, 12, [ 24, 3] 1, 40, 3, 4, 16, 6, 3, [3, 12,] 3, 3, 3, 4, 3, [-1, 12, 1, 16, 20, 12,110, [ 6, 1] 6, 96, 16, -3] 16, 24,120, 24, 12, 1, 3, 1, 24, 12, 3, 24,] 3, 6, 1, [ 18, [ 3, 16, [1, 42, 3, 1, 6, 3, 6, 24,] 6, 90, 1, 12, -1] 48, 3, 1, 24, 24, 12, 1, 12,] 6, 6, 3, 6, 8, [ 4, 1, 12, 3, 10, 3, 3, [-1, 8, 3, 24, 60, 24,288, 24, 3, 24, -1] 10, 1, 6, 1, 2, 6, 6, 2, 3, 3,360, 24, 24, 84, 6, 3, 6, [ 52, 24, 6, 3, 12,] 60, 6, 48, 6, [5, 28, 3, 12, 6, 3, 3, 1, 1, 12, 6, 5] 48, 2, 24, [3, 6, 24,120, 24,120, 24, 4, 20, -1] 12, 6, 6, 3, 3, 16, 1, [ 24, 6, 6, 16, 24,144, 6,156, [3, 6,156, 6, 24,120, 36, [ 6, 12, 24, -1] 3, 24, 3, 6, 48, 1, 24, 6, 3, 24, 3, 24, 24, 40, 12, 6,156, 18, 24,120, 1, 24, 6, 72, 12, [ 3,] 12, 3, 12,] 24, 3, 60,] 6, 96, 12, 16, 16, 6, 24, 6,156, 3, 6,] 1, 3, 12, 12, 3, 6, 24, 3, 8, 3, 3, 55, 16, 24, 4, 18, 90, 3, 90, 3, 6, x 6, 12, 24,] 6, 24,] 24,] 1 6, 3, (1 16, 3, 52, 4, 3, 21, 90, 1, - 6, 48, 48, 24,] x) 3, 2, 12, 3, 3, 3, 6, 90, 12, 24, 4, 24, 24,] 16, 2, 3, 24,288, 12, 6, 8, 12, 6, 3, 6,360, 9, 6, 1 6, 40, 8, 12,] - 12, 12,] 3, 3, 6, x 6, 10, 6, 2 12, 3, 6, 6, 5, 6, 3, 56, 6, 12, 24, 14, 5, 3, 6, 24, 1 12, 3, + 14, 3, 24,288, 6, 4, 5 24, 12, x 3, 9, 6, 18, 4, 18, 12, 12, 3, 6, 18, 6,] 9, 12, 3, 6,] x 6,] 9, 3, 6,] 3,] 1 + 4 x 1 1 - + x x x 2 2 1 1 A001353 [4, -1] [ 1, 2, 6, 4, 3, 6, 8, 4, 18, 6, 10, 12, 12, 8, 6, 8, 18, 18, 5, 12,] x x x x x x x 2 3 1 + x x - 1 1 + x 2 x - 3 1 - 2 x x (1 + x)

10 RICHARD J. MATHAR A001906A007598A098149A015523A072263A098150A015587A015440 [2, [3, 2, -1] -1]A010892 [ [ [-3,A131531 -1] 1, 1,A052918 [ A175184 3, 3, [3,A015442 1, 5] 4, 4, [3, [-3,A061084 3, [ 3, 5] 3, -1] 10, 10, 4,A022098 1, 12, [ 12, [ [9, 6, 11] 3, 8,A000032 1, 8, 1, A106291 1, [ 4, [5, 6, [1, 3, 6,A022103 3, 12, [0, 1] 12, 5] 12, [1, 0, 1, 6, 30, 4, 30, -1] 4, 8, -1]A015541 [ [ 10, 3, 4, 5, 6, 12, [ 6, 6, [ 12, 1,A056570 12, 1, 14, 12, 4, 14, 4, 24, 1, 5, 1, 3, 3, 24, 3, 12,A000285 20, 12, 3, 6, 12, 20, 12, 3, 10, 3, 20, 12, 8, 12, 6, [1, 3, [1, 18, 8,A022095 12, 12, 12,120, 18, 1] 12, 7] 12, 6, [-1, 6, 48, 12, 6, 12, 6, 12, 18, 6, 1] 7,A022100 12, [ 12,120, [ 30,] 6, 12, 24, 6, 6, 2, 9, 1, 12, 15, [ 12, [1, 3, 24, 30,] 1,A022101 12, 1, 6, 10, 4, 6, 60, 1] [3, 6, 12, 1, 12, 4, 6, 6, 21, 3, 3, 3, 6,A022102 6, 5, [ 24,288, 12, -3, 12, 7, 3, 9, 12,168, 12, -1] 18, 8, 4, 8, 6, [1, 24, 12, 6,A022097 48, 1, 72, 8, 24,288, 1] 20, 8, 18, 20, 12,] [ 3, 6, 12, 6, 6, 12, 6, [5, 12,288, 3, 6,A022099 40, 72, [ 6, 6,] 7] 12, 24, 1, 4, 12,] 4, 6, 9, 6, 8, 24, 6, 24, 24,A000045 1, 12, 4, [ 6, 12, 3, 56, 16, A001175 6, 18, 24, 6, 60,] 6, 21, 12, 1, [1, 3, 30,] 16,A020695 1, 6, 8, 24, 1] 6, 12, A001175 6, 4, 6, 12, 6, 8, 24, [1, 3, 24,A020701 8, 6, 24, 10, 24, [ 6, 12, 1] 6, 16, 24, 20, 16, 24, 12, 6, 10, 8, 12, [1, 36, 24, 18,360, 28,A001060 60, 1, 6, 24, [ 6, 24, 1] 24, 16, 48, A175183 24, 4, 28, 6, 12, 40, 12, 6,] [1, 12, 3, 6, 24, 48, 1, 6, 10, [ 8, 1] 16, 8, 24, 6,] 8, 24, 3, 8, [1, 6, 12, [1, 8, 3, 6, 24, 28, 1, 60, 36, [ 1] 24, 1] 24, 48, 10, 24, 8, 6, 6, 12, 36, 8, [1, 6, 6, [1, 3, 24, 18, 1, 20, [ 10, [ 24, 1] 1] 8, 28, 12,] 6,288, 24, 6, 24, 18, 6, 6, 6, 24, 8, 48, [1, 3, 24,120, 16, 1, 28, 1, 12,] 20, [ 24, [ 36, 40, 1] 12,] 12, 6, 48, 24, 6, 24, 24, 6, 24, 8, [1, 24, 3, 3, 16, 1, 1, 18, 20, 36, [ 1] 60, 6, 8, 12, 6, 5, 12,] 24, 24, 6, 8, 24, 8, 24, 3, 24, 3, 16, 18, 1, 20, [ 5, 6,] 36, 60, 6,] 12, 12, 60,] 24, 24, 6, 24, 6, 10, 8, 8, 24, [1, 3, 16, 1, 28, 20, 18, 20, 24, 6, 60, 1] 12, 48, 24, 12,] 24, 28, 6, 6, 10, 8, 24, 3, 40, 16, 16, 48, 20, 8, 20, 24, [ 60, 24, 12, 12, 40, 24, 12, 24, 28, 6, 10, 8, 36, 24, 24, 24, 16, 16, 16, 48, 1, 20, 24, 24, 60, 60, 36, 12, 24,120, 12, 40, 24, 28, 6, 18, 10, 10, 24, 24, 24,] 24, 24, 3, 16, 48, 20, 60,] 24, 24, 60, 60, 36, 12, 40, 24, 28, 28, 9, 10, 10, 24, 8, 24, 24, 16, 48, 48, 60,] 24, 24, 18, 60, 36, 12, 40, 40, 28, 28, 60,] 6, 10, 24, 24, 24, 24, 48, 48, 20, 24, 18, 60, 36, 36, 40, 40, 24, 28, 60,] 10, 24, 24, 24, 24, 16, 48, 24, 18, 18, 36, 36, 12, 40, 28, 60,] 60,] 24, 24, 24, 24, 48, 18, 18, 60, 36, 40, 60,] 60,] 10, 24, 24, 24, 18, 36, 28, 60,] 24, 48, 18, 40, 60,] 24, 36, 24, 18, 60,] x x 1 + 8 x x 1 (1 + x) (1 - x) 1 + 1 6 + x 10 1 x + 11 2 1 x + 12 3 1 x + + 2 7 1 x x + 9 x x 5 + 3 x A001519 [3, -1] [ 1, 3, 4, 3, 10, 12, 8, 6, 12, 30, 5, 12, 14, 24, 20, 12, 18, 12, 9, 30,] 1 2 x 4 3 1 x 1 1 1 x x 1 x 1 1 1 + x

PISANO PERIODS 11 A000217A133872A027656A130472A000330A000292A008937 [3, -3, [0, 1]A057597 [1, 2, -1, 0, [ 1]A020992 -1] [4, 1, -6, [ [A000073 [-1, 4, [4, A046738 1, 4, -1] 1, -6, 1, 1]A000078 4, 3, [ 4, -1] 4, [2, [A073817 0, 8, 1, A106295 4, [ 6, 0, 1,A134667 -1] 5, 4, 4, 1, 8, [1, 4, 12, [-1, 10, 1, [A104581 -1, 9, [1, 4, 4, 12, 1] 6, 7, 1] 1, 14, 1, 16,A052541 8, 1, 4, 9, 16, [ 8, [ 1] [1, 18, 4, 10, 9, 5, 4, 1,A000930 8, 20, 1, 13, 12, [1, 20, 1, 36, [ 1] 22, 14, 1, 11, 4, 5, 24, 4,A199804 8, 16, 1, 24, 4, 7, 1, [ 36, [0, 26, 13, 31, 18, 1] 13, 13, 16, 4, -1, 28, 52, [-1, 20,A077962 28, 27, 5, 1, 7, 0, 30, 8, 48, 0, 22, [ 15, 8, 20, 26, 4, 16, -1] 32, 31, 16, -1, 24, 32, 31, 11, 10,312,130,342,A005314 4, 27, 34, 52, 39,124,110,104,168, -1] 26, 1, 17, 52, 72, 20, 4, 13, 20, [ 36, 48, 48,403, 28, 36, 48, 13, 78,1560,120,130, 11,A104769 38, 16, 32, [ 30, 5, 19, 16, 28, 84,1710,312, 4, 8, 72, 1, 40,] 39,124,110,104,168, 96,156,360,248,] 32, 26, 40,] 39,124,110,104,168, 45, 40,4912,390,6858,1560,] 31, 13, 48,403, 1,A001608 34, 10,312,130,342, 48,403, 32, 4, 52, 28, 6, 32, A104217 36, 20, 32, [3, 17,108, 48, 45, 96,156,360,248,] 6, 38, 78,1560,120,130, 96,156,360,248,] 0,A099530 19, 4, 16, 32, 6, 18, 40,] 84,1710,312, 1] 40,] 39,124,110,104,168, [1, 17,108, [-1, 12, 40,4912,390,6858,1560,] 4, 48,403, 0,A124750 19, 6, 0, 30, [ 32, 1] 40,] -1] 18, [0, 4, 96,156,360,248,] 6,A003520 42, -1, 1, [ [ 24, [0, -1] 4, 6, 54, 1,A088002 7, [2, 1, 1, 30, 1] [ -1, 4, 6, 66, 3, 1] 7, [-1, 7, 36, [ 1, 14, [-1, 4, 6, 0, 78, 20, 0, [ 8, 1] 8, 42, 1, 7, 21, 0, 4,] 14, 6, 14, 90, 48, -1] 1, 31, [0, [ 62, [1, 48,102, 7, 8, 28, 56, 0, 6, 56,114, 0, 54,114, 13, 14, [ 7, 57, 1, 1, 28, 0, 60,] 14, 62, [0, 9,140, 13, 28, -1] 6, 24,434, 0, 24, 56,114, -1, 40, 1, 24,217, 7, 60, 1] 91, 28, 0, 42,168,336, 15, 7, 60, [ 6, 13, 56,168,798,248, 48, 24,434, 0, 60, 13, 12, 56,168,399,248, 14, 56,288,168,762,434,] [ 28, 60, -1] 56,307, 30,124,195,400, 91, 56,288,168,381,434,] 1, 6, 24, 39,168,120,182,183,336,312, 56,168,798,248, 63,127,140,] 60, 24, 15, 91, 1, 56,288,273,180,168,] 56,288,168,762,434,] [ 39,1860,1330,390,2380,1200,1612,120,4912,195,6858,1860,] 14, 26, 6, 48, 21, 39, 30,124,390,400, 28, 78, 1, 84, 60, 6, 39,168,120,182,183,336,312, 42, 31, 60, 78,1860,665,390,2380,1200,1612,120,4912,390,3429,1860,] 56,288,273,180,168,] 24,546,336, 80, 91,183,168,156, 6, 84, 62,744,2480,304,124,240,744,14640,2480,168,9424,7440,248,88416,7440,32580,744,] 28,144,273, 78,168,120,546,366,336,312,168,288,546,180,168,] 90, 6, 84,] 6, 6, 6,] x 3 x 1 1 1 2 x 2 1 A020712A013655A008998A077963 [1, 1] [2, [0, [1, 0, -2, [ 1] 1] -1] 1, [ [ [ 3, 1, 1, 1, 8, 3, 3, 3, 13, 26, 6, 8, 20, 6, 6, 24, 6, 31, 62, 16, 20, 39, 78, 12, 24, 19, 38, 24, 16, 12, 12, 60, 12, 39, 78,186,120, 10, 24, 93,120, 78,168,114,806, 24, 60, 78,168, 24, 28, 10, 57,403, 16, 48, 24, 24, 78,762,186,] 40, 28, 16, 24, 48, 39,381,186,] 36, 40, 24, 24, 18, 36, 60,] 24, 18, 60,] x 2 1 (2 + - x x) 12 RICHARD J. MATHAR

A first result is that the generalized Fibonacci sequences of the signature [1, 1],

(28) a(n) = a(n − 1) + a(n − 2), a(0) = α0, a(1) = α1, share many period lengths. This is a result of an inheritance of periods of the following type [5]: the Fibonacci numbers [19, A000045] are (29) F (n) = F (n − 1) + F (n − 2),F (0) = 1,F (1) = 1 with generating function x (30) g(x) = . 1 − x − x2 The generalized Fibonacci sequences are linear combinations

(31) a(n) = (α1 − α0)F (n) + α0F (n + 1) with generating function α + (α − α )x (32) g(x) = 0 1 0 1 − x − x2 and if on the right hand side of this equation F (n) = F (n + pk) (mod k) and F (n+1) = F (n+1+pk) (mod k), then the left hand side is also periodic with period length pk (mod k)—and for some k the period may be shorter. In this spirit, the sequences with the simplest 1-term numerator in their generating function are base sequences, the sequences with multi-term numerators are linear superpositions of these (with cofficients to be read off the numerators), and the Pisano period lengths of the derived sequences are never larger than the period of the basic sequence (and therefore of that period [4]).

References 1. W. W. Adams, Characterizing pseudoprimes for third-order linear recurrences, Math. Comp. 48 (1987), no. 177, 1–15. MR 0866094 2. M. Bousquet-M´elouand Marko Petkovˇsek, Linear recurrences with constant coefficients: the multivariate case, Discrete Math. 225 (2000), no. 1–3. MR 1798324 (2002a:05005) 3. Richard P. Brent, On the periods of generalized Fibonacci sequences, Math. Comput. 63 (1994), no. 207, 389–401. MR 1216256 (94i:11012) 4. H. T. Engstrom, On sequences defined by linear recurrence relations, Trans. Am. Math. Soc. 33 (1931), no. 1, 210–218. MR 1501585 5. Sergio Falcon and Angel´ Plaza, k-fibonacci sequences modulo m, Chaos, Solitons, Fractals 41 (2009), 497–504. 6. Charles M. Fiduccia, An efficient formula for linear recurrences, SIAM J. Comput. 14 (1985), no. 1, 106–112. MR 0774930 (86h:39001) 7. Emrah Kilic and Dursun Tasci, Factorizations and representations of the backward second- order linear recurrences, J. Comput. Appl. Math. 201 (2007), no. 1, 182–197. MR 2293547 (2008e:65399) 8. J. Kramer and Jr. Hogatt, Verner E., Special cases of fibonacci periodicity, Fib. Quart. 10 (1972), no. 5, 519–522. MR 0308020 9. R. R. Laxton, On groups of linear recurrences, Duke Math. J. 36 (1969), no. 4, 721–736. MR 0258781 (41 #3427) 10. Pierre l’Ecuyer and Raymond Couture, An implementation of the lattice and spectral tests for multiple recursive linear randon number generators, INFORMS J. Comput. 9 (1997), no. 2, 206. 11. W. H. Mills, Continued fractions and linear recurrences, Math. Comp. 29 (1975), no. 129, 173–180. MR 0369276 (51 #5511) 12. Graham H. Norton, On shortest linear recurrences, J. Symb. Comput. 27 (1999), no. 3, 325– 349. MR 1673607 (2000i:13033) PISANO PERIODS 13

13. Francois Panneton, Pierre l’Ecuyer, and Makato Matsumoto, Improved long-period generators based on linear recurrences modulo 2, ACM Trans. Math. Softw. 32 (2006), no. 1, 1–16. MR 2272349 14. Attila Peth˝o, Perfect powers in second order linear recurrences, J. 15 (1982), no. 1, 5–13. MR 0666345 15. Helmut Prodinger and Wojciech Szpankowski, A note on binomial recurrences arising in the analysis of algorithms, Inf. Proc. Lett. 46 (1993), no. 6, 309–311. MR 1231833 16. Patrice Quinton and Vincent van Dongen, The mapping of linear recurrence equations on regular arrays, J. VLSI Signal Proc. 1 (2006), no. 2, 95–113. 17. J. A. Reeds and N. J. A. Sloane, Shift-register synthesis (modulo m), SIAM J. Comp. 14 (1985), 505–513. MR 0795927 (86i:94068) 18. D. W. Robinson, A note on linear recurrent sequences modulo m, Am. Math. Monthly 73 (1966), no. 6, 619–621. MR 0201376 19. Neil J. A. Sloane, The On-Line Encyclopedia Of Integer Sequences, Notices Am. Math. Soc. 50 (2003), no. 8, 912–915, http://oeis.org/. MR 1992789 (2004f:11151) 20. Lawrence Somer, Possible periods of primary fibonacci-like sequences with respect to a fixed odd prime, Fib. Quart. 20 (1982), no. 4, 311–333. MR 0684915 21. Wojciech Szpankowski, Solution of a linear recurrence equation arising in analysis of some algorithms, Tech. Report CSD-TR-552, Purdue University, 1985. 22. Morgan Ward, The characteristic number of a sequence of satisfying a linear recur- sion relation, Trans. Am. Math. Soc. 33 (1931), no. 1, 153–165. MR 1501582 23. , The arithmetical theory of linear recurring series, Trans. Am. Math. Soc. 35 (1933), no. 3, 600–628. MR 1501705 24. Neal Zierler, Linear recurring sequences, J. SIAM 7 (1959), no. 1, 31–38. MR 0101979 (21 #781) URL: http://www.strw.leidenuniv.nl/~mathar E-mail address: [email protected]

Leiden Observatory, P.O. Box 9513, 2300 RA Leiden, The Netherlands