OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
11*18 - 1 = 197 (prime), 11*18 + 1 = 199 (prime).
MATHEMATICA
a=18; Select[Prime[Range[250]], PrimeQ[a*#-1]&&PrimeQ[a*#+1] &]
PROG
(Magma) [n: n in [0..10000] |IsPrime(n) and IsPrime(18*n-1)and IsPrime(18*n+1)] // Vincenzo Librandi, Aug 03 2010
(Python)
from sympy import isprime, primerange
def ok(p): return isprime(18*p-1) and isprime(18*p+1)
def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
print(aupto(6299)) # Michael S. Branicky, Nov 29 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 05 2008
STATUS
approved