%I #10 Sep 24 2018 02:40:03
%S 0,4,9,7,21,25,17,13,25,61,11,25,29,49,41,25,37,25,19,61,17,31,49,25,
%T 101,85,73,49,15,121,31,49,41,37,81,25,77,19,57,61,41,49,89,31,121,49,
%U 33,25,113,301,73,85,109,73,21,49,73,43,59,121,61,31,49,97,141,121,137
%N Define a(1)=0. Then define b(1)=1, b(2)=1 and for k > 2, b(k) = (b(k-2) + b(k-1)) (mod n). This gives for each n a cyclic repetitive sequence; a(n) is the least k > 1 for the first 1 of the sequence 1,1,....
%C This sequence gives a great number of primes or primes squared: For n = P(i)# = 2, 6, 30, 210, 2310, 30030, 510510, 9699690, 223092870 we get a(P(i)#) = 2^2, 5^2, 11^2, 241, 241, 41^2, 71^2, 71^2, 71^2.
%F a(n) = A001175(n) + 1 for n > 1. - _T. D. Noe_, Jan 09 2009
%e b(1)=1, b(2)=1; for n=2 the sequence is 1,1,0,1,1,0,1,1,0,... so a(2)=4 as for k=4 you recover 1,1,0.
%e For n=3 the sequence is 1,1,2,0,2,2,1,0,1,1,2,0,... so a(3)=9 as for k=9 you recover 1,1,2.
%K nonn
%O 1,2
%A _Pierre CAMI_, Aug 19 2004