A189768 Irregular triangle in which row n contains the set of residues of the sequence Fibonacci(i) mod n for i=0,1,2,....
0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 5, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 5, 8, 10, 0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 0, 1, 2, 3, 5, 8, 10, 11, 12
Offset: 1
Examples
The triangle begins 0 0, 1 0, 1, 2 0, 1, 2, 3 0, 1, 2, 3, 4 0, 1, 2, 3, 4, 5 0, 1, 2, 3, 4, 5, 6 0, 1, 2, 3, 5, 7 0, 1, 2, 3, 4, 5, 6, 7, 8 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Links
- T. D. Noe, Rows n = 1..100, flattened
Programs
-
Mathematica
pisano[n_] := Module[{a = {1, 0}, a0, k = 0, s}, If[n == 1, 1, a0 = a; While[k++; s = Mod[Total[a], n]; a[[1]] = a[[2]]; a[[2]] = s; a != a0]; k]]; Flatten[Table[p=pisano[n]; f=Mod[Fibonacci[Range[0,p]],n]; Union[f], {n,15}]]
Comments