login
a(0) = 2, a(n)=smallest prime > a(n-1) such that a(n) - a(n-1) == 0 mod n!.
0

%I #7 Mar 03 2024 17:29:50

%S 2,3,5,11,59,179,1619,6659,87299,1175939,12062339,131812739,610814339,

%T 13064855939,536134603139,20151250123139,41074040011139,

%U 2886573464779139,79715057933515139,444650359160011139

%N a(0) = 2, a(n)=smallest prime > a(n-1) such that a(n) - a(n-1) == 0 mod n!.

%C a(4) onwards a(n) == 9 (mod 10)

%e a(4) = 59 and a(4) - a(3) = 59 - 11 = 48 = 2*4!.

%t 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 *)

%K nonn

%O 0,1

%A _Amarnath Murthy_, Sep 11 2003

%E More terms from _Ray Chandler_, Sep 14 2003