OFFSET
0,1
COMMENTS
a(4) onwards a(n) == 9 (mod 10)
EXAMPLE
a(4) = 59 and a(4) - a(3) = 59 - 11 = 48 = 2*4!.
MATHEMATICA
nxt[{n_, a_}]:=Module[{p=NextPrime[a]}, While[Mod[p-a, (n+1)!]!=0, p=NextPrime[p]]; {n+1, p}]; NestList[nxt, {0, 2}, 11][[;; , 2]] (* The program generates the first 12 terms of the sequence. *) (* Harvey P. Dale, Mar 03 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 11 2003
EXTENSIONS
More terms from Ray Chandler, Sep 14 2003
STATUS
approved