

A223489


a(n) = number of missing residues in the Lucas sequence mod the nth prime number.


1



0, 0, 1, 0, 4, 1, 1, 7, 4, 19, 12, 9, 22, 10, 32, 9, 22, 33, 16, 27, 17, 30, 20, 65, 17, 66, 24, 74, 61, 73, 30, 49, 37, 106, 77, 114, 33, 40, 40, 49, 67, 119, 72, 49, 49, 183, 181, 54, 56, 149, 205, 90, 138, 94, 61, 178, 149, 102, 73, 254, 70, 81, 264, 117, 69
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,5


COMMENTS

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


REFERENCES

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


LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000


EXAMPLE

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 4 residues which do not occur in this sequence, namely {5,6,8,9}. So a(5) = 4.


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]]; mx = Max[u]; Length[Complement[Range[0, mx], u]], {n, Prime[Range[2, 100]]}]] (* T. D. Noe, Mar 22 2013 *)


CROSSREFS

Cf. A137751.
Sequence in context: A046554 A010321 A046550 * A016521 A146880 A152236
Adjacent sequences: A223486 A223487 A223488 * A223490 A223491 A223492


KEYWORD

nonn


AUTHOR

Casey Mongoven, Mar 20 2013


STATUS

approved



