OFFSET
1,1
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
Ernest G. Hibbs, Component Interactions of the Prime Numbers, Ph. D. Thesis, Capitol Technology Univ. (2022), see p. 33.
Eric Weisstein's World of Mathematics, Sexy Primes. [The definition in this webpage is unsatisfactory, because it defines a "sexy prime" as a pair of primes.- N. J. A. Sloane, Mar 07 2021].
FORMULA
a(n) = A087695(n) + 3.
a(n) = A023201(n) + 6. - M. F. Hasler, Jan 02 2020
MATHEMATICA
q=6; a={}; Do[p1=Prime[n]; p2=p1+q; If[PrimeQ[p2], AppendTo[a, p2]], {n, 7^2}]; a "and/or" Select[Prime[Range[3, 7^2]], PrimeQ[ # ]&&PrimeQ[ #-6]&] (* Vladimir Joseph Stephan Orlovsky, Aug 07 2008 *)
Select[Prime[Range[4, 200]], PrimeQ[#-6]&] (* Harvey P. Dale, Mar 31 2018 *)
PROG
(PARI) forprime(p=2, 1e4, if(isprime(p-6), print1(p", "))) \\ Charles R Greathouse IV, Jul 15 2011
(Magma) [p:p in PrimesInInterval(7, 650)| IsPrime(p-6)]; // Marius A. Burtea, Jan 03 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by M. F. Hasler, Jan 02 2020
STATUS
approved