OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
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