login
A096982
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,....
1
0, 4, 9, 7, 21, 25, 17, 13, 25, 61, 11, 25, 29, 49, 41, 25, 37, 25, 19, 61, 17, 31, 49, 25, 101, 85, 73, 49, 15, 121, 31, 49, 41, 37, 81, 25, 77, 19, 57, 61, 41, 49, 89, 31, 121, 49, 33, 25, 113, 301, 73, 85, 109, 73, 21, 49, 73, 43, 59, 121, 61, 31, 49, 97, 141, 121, 137
OFFSET
1,2
COMMENTS
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.
FORMULA
a(n) = A001175(n) + 1 for n > 1. - T. D. Noe, Jan 09 2009
EXAMPLE
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.
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.
CROSSREFS
Sequence in context: A353071 A365906 A256174 * A212877 A205297 A159643
KEYWORD
nonn
AUTHOR
Pierre CAMI, Aug 19 2004
STATUS
approved