login
A105439
a(n) = the smallest prime p such that p+2 and q+2 are prime; q is the n-th prime after p.
4
3, 5, 3, 5, 3, 17, 5, 3, 59, 5, 3, 11, 17, 5, 3, 29, 5, 3, 17, 41, 11, 41, 5, 3, 5, 3, 137, 11, 71, 5, 3, 5, 3, 17, 29, 11, 71, 5, 3, 5, 3, 5, 3, 11, 17, 5, 3, 137, 5, 3, 41, 11, 17, 5, 3, 41, 5, 3, 11, 227, 5, 3, 71, 11, 137, 5, 3, 41, 71, 41, 29, 59, 29, 17, 179, 11, 191, 5, 3, 5, 3
OFFSET
1,1
LINKS
EXAMPLE
a(2)=5 because 5+2 and 11+2 are primes.
MATHEMATICA
pqr[n_]:=Module[{p=3}, While[AnyTrue[{p+2, NextPrime[p, n]+2}, CompositeQ], p= NextPrime[p]]; p]; Table[pqr[n], {n, 90}] (* Harvey P. Dale, Nov 12 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, May 02 2005
EXTENSIONS
Edited by Don Reble, Jun 11 2007
STATUS
approved