OFFSET
1,1
COMMENTS
Differences when decreasing are essentially A001223, so increases occur when primes being used are roughly double those at previous increase; e.g. a(3352)=(12+31123)mod 31139=31135 and a(6257)=(1+62273)mod 62297=62274 - Henry Bottomley, Jul 13 2003
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(2) = (a(1) + 3) mod 5 = 5 mod 5 = 0.
a(3) = (a(2) + 5) mod 7 = 5 mod 7 = 5.
a(4) = (a(3) + 7) mod 11 = 12 mod 11 = 1.
MATHEMATICA
nxt[{n_, a_}]:={n+1, Mod[a+Prime[n+1], Prime[n+2]]}; NestList[nxt, {1, 2}, 70][[All, 2]] (* Harvey P. Dale, Sep 13 2016 *)
PROG
(PARI) ps=0; pc=1; while (pc<100, ps+=prime(pc); ps%=prime(pc++); print1(ps", "))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jon Perry, May 28 2003
EXTENSIONS
Edited by Henry Bottomley, Jul 13 2003
Definition clarified by Harvey P. Dale, Sep 13 2016
STATUS
approved