OFFSET
0,2
COMMENTS
Indices n such that a(n)=n:
3, 4, 69, 709, 4267, 11807, 53694, 172760, 243621, 2097734, 1219835399, 1285668346.
Conjectures:
1. Sequence contains infinitely many terms such that a(n)=n.
2. Infinitely many 1's.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
MATHEMATICA
nxt[{n_, a_, b_}]:={n+1, b, Mod[a*b, n+1]+1}; NestList[nxt, {1, 1, 2}, 80][[All, 2]] (* Harvey P. Dale, Apr 16 2022 *)
PROG
(Python)
prpr = 1
prev = 2
for n in range(2, 99):
current = (prpr * prev) % n + 1
print prpr,
prpr = prev
prev = current
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, May 03 2012
STATUS
approved