A223489 a(n) = number of missing residues in the Lucas sequence mod the n-th prime number.
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
Offset: 1
Keywords
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 4 residues which do not occur in this sequence, namely {5,6,8,9}. So a(5) = 4.
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
Crossrefs
Cf. A137751.
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]]; mx = Max[u]; Length[Complement[Range[0,mx], u]], {n, Prime[Range[2, 100]]}]] (* T. D. Noe, Mar 22 2013 *)
Comments