login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #8 Aug 03 2014 14:01:41

%S 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,

%T 24,74,61,73,30,49,37,106,77,114,33,40,40,49,67,119,72,49,49,183,181,

%U 54,56,149,205,90,138,94,61,178,149,102,73,254,70,81,264,117,69

%N a(n) = number of missing residues in the Lucas sequence mod the n-th prime number.

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

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

%H T. D. Noe, <a href="/A223489/b223489.txt">Table of n, a(n) for n = 1..1000</a>

%e 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.

%t 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 *)

%Y Cf. A137751.

%K nonn

%O 1,5

%A _Casey Mongoven_, Mar 20 2013