OFFSET
1,1
COMMENTS
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..100
EXAMPLE
a(2) = 67 = prime(19) since prime(19+1) - prime(19) = 71 - 67 = 2*2 and 19 is the smallest prime with this property.
MATHEMATICA
Prime[Prime[Min[Flatten[Position[Table[Prime[Prime[n]+1]- Prime[Prime[n]], {n, 1, 5000}], 2*j]]], {j, 1, 100}]]]
PROG
(PARI) a(n) = {my(p=2); while((prime(p+1)-prime(p))!=2*n, p=nextprime(p+1)); prime(p)} \\ Klaus Brockhaus, Jun 27 2004
(PARI) a(n) = {my(p=2, k=1); forprime(q=3, oo, if(q==p+2*n && isprime(k), return(p)); p=q; k++)} \\ Andrew Howroyd, Dec 16 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 23 2004
EXTENSIONS
a(31)-a(36) from Klaus Brockhaus, Jun 27 2004
a(37) onwards from Andrew Howroyd, Dec 16 2024
STATUS
approved