login
A124065
Numbers k such that 8*k - 1 and 8*k + 1 are twin primes.
9
9, 24, 30, 39, 54, 75, 129, 144, 165, 186, 201, 234, 261, 264, 324, 336, 339, 375, 390, 396, 420, 441, 459, 471, 516, 534, 600, 621, 654, 660, 690, 705, 735, 795, 819, 849, 870, 891, 936, 945, 1011, 1029, 1125, 1155, 1179, 1215, 1221, 1251, 1284, 1395, 1419
OFFSET
1,1
LINKS
EXAMPLE
9 is in the sequence since 8*9 - 1 = 71 and 8*9 + 1 = 73 are twin primes.
MATHEMATICA
Select[Range[1500], And @@ PrimeQ[{-1, 1} + 8# ] &] (* Ray Chandler, Nov 16 2006 *)
PROG
(Magma) [n: n in [1..2000] | IsPrime(8*n+1) and IsPrime(8*n-1)] // Vincenzo Librandi, Mar 08 2010
(Python)
from sympy import isprime
def ok(n): return isprime(8*n - 1) and isprime(8*n + 1)
print(list(filter(ok, range(1420)))) # Michael S. Branicky, Sep 24 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Nov 04 2006
EXTENSIONS
Extended by Ray Chandler, Nov 16 2006
STATUS
approved