login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A088521
a(1) = 1; for n > 1, a(n) = (a(n-1) + n) mod prime(n).
3
1, 0, 3, 0, 5, 11, 1, 9, 18, 28, 8, 20, 33, 4, 19, 35, 52, 9, 28, 48, 69, 12, 35, 59, 84, 9, 36, 64, 93, 10, 41, 73, 106, 1, 36, 72, 109, 147, 19, 59, 100, 142, 185, 36, 81, 127, 174, 222, 44, 94, 145, 197, 9, 63, 118, 174, 231, 18, 77, 137, 198, 260, 16, 80, 145, 211, 278, 9
OFFSET
1,3
LINKS
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Mod[a[n - 1] + n, Prime[n]]; Table[ a[n], {n, 69}]
RecurrenceTable[{a[1]==1, a[n]==Mod[a[n-1]+n, Prime[n]]}, a, {n, 70}] (* Harvey P. Dale, Nov 10 2014 *)
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