The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A182457 a(0)=0, a(1)=1, a(n) = (a(n-2)*a(n-1)+1) mod n. 2
 0, 1, 1, 2, 3, 2, 1, 3, 4, 4, 7, 7, 2, 2, 5, 11, 8, 4, 15, 4, 1, 5, 6, 8, 1, 9, 10, 10, 17, 26, 23, 10, 7, 5, 2, 11, 23, 32, 15, 13, 36, 18, 19, 42, 7, 25, 38, 11, 35, 43, 6, 4, 25, 48, 13, 20, 37, 0, 1, 1, 2, 3, 7, 22, 27, 10, 7, 4, 29, 48, 63, 43, 46, 8 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS Indices of zeros: 0, 57, 123, 1975, 2551, 5473, 5537, 7271, 39480, 132993, 153539, 224581, 5925390, 10243877, 123259126, 284753964, 2520364708, 2985427716, 5115049972, 11066575675, 13451039887, 33557189081, 242574973569, 5212220671625, 10346718074797 Conjecture: a(n) contains infinitely many zeros. LINKS Ivan Neretin, Table of n, a(n) for n = 0..10000 MATHEMATICA Nest[Append[#, Mod[#[[-1]]*#[[-2]] + 1, Length[#] + 1]] &, {1, 1}, 71] (* Ivan Neretin, May 14 2015 *) PROG (Python) prpr = 0 prev = 1 for n in range(2, 77): .  current = ( prev*prpr + 1 ) % n .  print prpr, .  prpr = prev .  prev = current CROSSREFS Cf. A182458. Sequence in context: A037222 A107357 A251718 * A334715 A026105 A303868 Adjacent sequences:  A182454 A182455 A182456 * A182458 A182459 A182460 KEYWORD nonn,easy AUTHOR Alex Ratushnyak, Apr 30 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 8 16:05 EST 2021. Contains 349596 sequences. (Running on oeis4.)