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.

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

This page as a plain text file.
%I A223488 #14 Dec 16 2014 12:30:47
%S A223488 2,3,4,7,7,12,16,12,19,10,19,28,19,33,15,44,37,28,51,44,56,49,63,24,
%T A223488 80,35,79,33,48,40,97,82,100,33,72,37,124,123,127,124,112,62,119,144,
%U A223488 148,16,30,169,171,80,28,149,103,157,196,85,120,169,204,27,213,212
%N A223488 Number of distinct residues in the Lucas sequence mod the n-th prime.
%C A223488 The Lucas numbers mod n for any n are periodic; see A106291 for period lengths.
%D A223488 V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
%H A223488 T. D. Noe, <a href="/A223488/b223488.txt">Table of n, a(n) for n = 1..1000</a>
%e A223488 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.
%t A223488 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 *)
%Y A223488 Cf. A137750.
%K A223488 nonn
%O A223488 1,1
%A A223488 _Casey Mongoven_, Mar 20 2013