OFFSET
1,2
COMMENTS
There are 138 such numbers between 1 and 1000.
Prime pairs that differ by 6 are called "sexy" primes. Other prime pairs that differ by 6 are of the form 6n - 1 and 6n + 5.
Numbers in this sequence are those which are not 6cd - c - d - 1, 6cd - c - d, 6cd + c + d - 1 or 6cd + c + d, that is, they are not (6c - 1)d - c - 1, (6c - 1)d - c, (6c + 1)d + c - 1 or (6c + 1)d + c.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Sally M. Moite, “Primeless” Sieves for Primes and for Prime Pairs Which Differ by 2m, vixra:1903.0353 (2019).
EXAMPLE
a(3) = 5, so 6(5) + 1 = 31 and 6(5) + 7 = 37 are both prime.
MATHEMATICA
Select[Range[400], AllTrue[6 # + {1, 7}, PrimeQ] &] (* Michael De Vlieger, Apr 15 2019 *)
PROG
(PARI) isok(n) = isprime(6*n+1) && isprime(6*n+7); \\ Michel Marcus, Apr 16 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Sally Myers Moite, Apr 14 2019
STATUS
approved