OFFSET
0,2
COMMENTS
Indices of zeros: 3, 284, 295, 1042, 1478, 36382, 52328, 63463, 1564027, 19758967, 152380267, 503372464, 9766438965, 119068745443, 220054053597, 234739914603, 881852361961, 3491882402381, 3681101616539, 5880347601791, 7363426715439, 10328374852578.
Conjecture: a(n) contains infinitely many zeros.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
MATHEMATICA
nxt[{n_, a_, b_}]:={n+1, b, Mod[a b+1, n+1]}; Join[{1}, Rest[NestList[nxt, {1, 2, 2}, 80][[All, 2]]]] (* Harvey P. Dale, Feb 14 2019 *)
PROG
(Python)
prpr = 1
prev = 2
for n in range(2, 77):
current = ( prev*prpr + 1 ) % n
print(prpr, end=', ')
prpr = prev
prev = current
(Haskell)
a182458 n = a182458_list !! n
a182458_list = 1 : 2 : zipWith mod
(map (+ 1) $ zipWith (*) a182458_list (tail a182458_list)) [2..]
-- Reinhard Zumkeller, May 01 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Apr 30 2012
STATUS
approved