cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A189768 Irregular triangle in which row n contains the set of residues of the sequence Fibonacci(i) mod n for i=0,1,2,....

Original entry on oeis.org

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

Views

Author

T. D. Noe, May 10 2011

Keywords

Comments

Sequence A066853 gives the lengths of the rows. Sequence A079002 gives the n that have a complete set of residues.

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
		

Crossrefs

Cf. A000045 (Fibonacci numbers), A066853, A079002.

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}]]