OFFSET
1,1
COMMENTS
LINKS
Karl V. Keller, Jr., Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Twin Primes
Wikipedia, Twin prime
EXAMPLE
For n = 18041, the numbers, 18041, 18043, 18047, 18049, 18059, 18061, are primes.
MATHEMATICA
Select[Prime[Range[2500]], Union[PrimeQ[{#, # + 2, # + 6, # + 8, # + 18, # + 20}]] = {True} &] (* Alonso del Arte, Dec 23 2014 *)
Select[Prime[Range[450000]], AllTrue[#+{2, 6, 8, 18, 20}, PrimeQ]&] (* Harvey P. Dale, Jun 11 2023 *)
PROG
(Python)
from sympy import isprime
for n in range(1, 10000001, 2):
..if isprime(n) and isprime(n+2) and isprime(n+6) and isprime(n+8) and isprime(n+18) and isprime(n+20): print(n, end=', ')
(PARI) forprime(p=1, 10^7, if(isprime(p+2) && isprime(p+6) && isprime(p+8) && isprime(p+18) && isprime(p+20), print1(p, ", "))) \\ Derek Orr, Dec 31 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Karl V. Keller, Jr., Dec 23 2014
STATUS
approved