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.

Showing 1-2 of 2 results.

A137751 a(n) = number of missing residues in the Fibonacci sequence mod the n-th prime number.

Original entry on oeis.org

0, 0, 0, 0, 4, 4, 4, 7, 4, 19, 12, 8, 22, 10, 32, 16, 22, 36, 16, 27, 16, 30, 20, 72, 28, 66, 24, 74, 60, 80, 30, 49, 28, 106, 88, 114, 44, 40, 40, 36, 67, 119, 72, 44, 48, 183, 181, 54, 56, 149, 212, 90, 138, 94, 64, 178, 156, 102
Offset: 1

Views

Author

Casey Mongoven, Feb 10 2008

Keywords

Examples

			The 5th prime number is 11. The Fibonacci sequence mod 11 is {0,1,1,2,3,5,8,2,10,1,0,1,...} - a periodic sequence. There are 4 residues which do not occur in this sequence, namely {4,6,7,9}. So a(5) = 4.
		

Crossrefs

A223488 Number of distinct residues in the Lucas sequence mod the n-th prime.

Original entry on oeis.org

2, 3, 4, 7, 7, 12, 16, 12, 19, 10, 19, 28, 19, 33, 15, 44, 37, 28, 51, 44, 56, 49, 63, 24, 80, 35, 79, 33, 48, 40, 97, 82, 100, 33, 72, 37, 124, 123, 127, 124, 112, 62, 119, 144, 148, 16, 30, 169, 171, 80, 28, 149, 103, 157, 196, 85, 120, 169, 204, 27, 213, 212
Offset: 1

Views

Author

Casey Mongoven, Mar 20 2013

Keywords

Comments

The Lucas numbers mod n for any n are periodic; see A106291 for period lengths.

Examples

			The 5th prime number is 11. The Lucas sequence mod 11 is {2,1,3,4,7,0,7,7,3,10,2,1,3,...} - a periodic sequence. There are 7 distinct residues in this sequence, namely {0,1,2,3,4,7,10}. So a(5) = 7.
		

References

  • V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.

Crossrefs

Cf. A137750.

Programs

  • Mathematica
    pisano[n_] := Module[{a = {2, 1}, a0, k = 0, s}, If[n == 1, 1, a0 = a; Reap[While[k++; s = Mod[Plus @@ a, n]; Sow[s]; a[[1]] = a[[2]]; a[[2]] = s; a != a0]][[2, 1]]]]; Join[{2}, Table[u = Union[pisano[n]]; Length[u], {n, Prime[Range[2, 100]]}]] (* T. D. Noe, Mar 22 2013 *)
Showing 1-2 of 2 results.