OFFSET
1,1
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..300
EXAMPLE
53 = 4*13 + 1 ; 107 = 2*53 + 1.
MATHEMATICA
t = {13}; Do[k = 1; While[p = k*t[[-1]] + 1; ! PrimeQ[p], k++]; AppendTo[t, p], {20}]; t (* T. D. Noe, Jul 24 2012 *)
nxt[n_]:=Module[{k=1}, While[!PrimeQ[k*n+1], k++]; n*k+1]; NestList[nxt, 13, 20] (* Harvey P. Dale, Apr 28 2014 *)
PROG
(PARI) a=13; for(n=1, 200, b=a*n+1; if(isprime(b), a=b; print1(a, ", "); next(n=1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Robin Garcia, Jul 23 2012
STATUS
approved