%I #16 Jun 28 2024 21:20:48
%S 2,3,5,13,31,137,853,6961,28697,179143,6836131,68540453,966402473,
%T 15530980021,94152282599,203835545219,2540178825227,61168127350667,
%U 6119352913891927,220357873027460039,16312601956945934813,750600047892540461437,33042714709228726238041
%N a(n+1) is the smallest prime > a(n) such that a(n+1) == a(n-1) (mod a(n)).
%H T. D. Noe, <a href="/A072999/b072999.txt">Table of n, a(n) for n=0..100</a>
%e After 3,5, one can't have composite 8, so keep adding 5 until you reach 13. After 5,13, one can't have composite 18, so keep adding 13 until you reach 31.
%t nxt[{a_,b_}]:=Module[{c=a+b},While[CompositeQ[c],c=c+b];{b,c}]; NestList[ nxt,{2,3},20][[All,1]] (* _Harvey P. Dale_, Aug 01 2017 *)
%o (PARI) l=2; h=3; print1("2, 3, "); while(l<2^128,t=l+h; while(!isprime(t),t+=h); print1(t,", "); l=h; h=t)
%Y Cf. A073680, A072535.
%Y Cf. A083698: partial fraction having these primes as numerators or denominators.
%K nonn
%O 0,1
%A _Phil Carmody_, Aug 15 2002