OFFSET
1,1
COMMENTS
LINKS
Karl V. Keller, Jr., Table of n, a(n) for n = 1..100000
Eric Weisstein's World of Mathematics, Prime Quadruplet.
Eric Weisstein's World of Mathematics, Twin Primes
Wikipedia, Twin prime
EXAMPLE
For n=71, the numbers 71, 73, 107, 109, are primes.
MATHEMATICA
a248367[n_] := Select[Prime@Range@n, And[PrimeQ[# + 2], PrimeQ[# + 36], PrimeQ[# + 38]] &]; a248367[8000] (* Michael De Vlieger, Jan 11 2015 *)
Select[Prime[Range[8000]], AllTrue[#+{2, 36, 38}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 17 2019 *)
PROG
(Python)
from sympy import isprime
for n in range(1, 10000001, 2):
..if isprime(n) and isprime(n+2) and isprime(n+36) and isprime(n+38): print(n, end=', ')
CROSSREFS
KEYWORD
nonn
AUTHOR
Karl V. Keller, Jr., Jan 11 2015
STATUS
approved