login
A088523
a(1) = 2; for n > 1, a(n) = (a(n-1) + prime(n)) mod n.
3
2, 1, 0, 3, 4, 5, 1, 4, 0, 9, 7, 8, 10, 11, 13, 2, 10, 17, 8, 19, 8, 21, 12, 5, 2, 25, 20, 15, 8, 1, 4, 7, 12, 15, 24, 31, 3, 14, 25, 38, 12, 25, 1, 18, 35, 4, 27, 10, 41, 20, 49, 28, 4, 39, 21, 4, 45, 26, 8, 49, 27, 10, 2, 57, 45, 32, 28, 25, 27, 26, 24, 23, 25, 28, 32, 35, 39, 46, 52, 61
OFFSET
1,1
LINKS
MATHEMATICA
a[1] = 2; a[n_] := a[n] = Mod[a[n - 1] + Prime[n], n]; Table[a[n], {n, 68, 81}]
nxt[{n_, a_}]:={n+1, Mod[a+Prime[n+1], n+1]}; NestList[nxt, {1, 2}, 80][[All, 2]] (* Harvey P. Dale, Jan 08 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 14 2003
EXTENSIONS
More terms from Robert G. Wilson v and Ray Chandler, Nov 15 2003
STATUS
approved