OFFSET
1,1
COMMENTS
Numbers k(n) are given in A105121.
a(n) appears to tend toward C*A055496(n), C~ 0.992521946129820000. - Bill McEachen, Feb 21 2022
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..3000..
EXAMPLE
a(10) = 1597; k(10) = 3; 2*1597 + j is not prime for 3 <= j < 9, but 2*1597 + 9 = 3203 is prime. Hence k(11) = 9 and a(11) = 3203.
MATHEMATICA
a[1] = {2, 0}; a[n_] := a[n] = Block[{m = 2a[n - 1][[1]], k = a[n - 1][[2]]}, While[ !PrimeQ[m + k], k++ ]; {m + k, k}]; Table[ a[n][[1]], {n, 30}] (* Robert G. Wilson v, Apr 08 2005 *)
PROG
(PARI) print1(a=2, ", "); k=0; for(n=2, 31, j=k; while(!isprime(2*a+j), j++); k=j; print1(a=2*a+k, ", ")) \\ Klaus Brockhaus, Apr 08 2005
CROSSREFS
KEYWORD
nonn
AUTHOR
Yasutoshi Kohmoto, Apr 08 2005
EXTENSIONS
Edited, corrected and extended by Klaus Brockhaus and Robert G. Wilson v, Apr 08 2005
STATUS
approved