login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A096482
a(n) = prime(prime(A096480(n))).
3
3, 67, 31, 401, 241, 211, 773, 2221, 1913, 7649, 3229, 1669, 2477, 10009, 5749, 33647, 9973, 14107, 60821, 130729, 16141, 15683, 113233, 86629, 95651, 74959, 35617, 388403, 214993, 557093, 248909, 637003, 296843, 448451, 186481, 1145899, 1283603, 1845637, 795349, 542603
OFFSET
1,1
COMMENTS
a(n) = prime(p) where p is the smallest prime such that prime(p+1) - prime(p) = 2*n.
Both a(n) and a(n) + 2*n are primes while pi(a(n)) = A096481(n) and pi(pi(a(n))) = A096480(n).
LINKS
FORMULA
a(n) = A006450(A096480(n)) = prime(A096481(n)).
a(n) + 2*n = prime(1 + prime(A096480(n))).
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
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