OFFSET
1,1
EXAMPLE
1*6 +/- 1 (5 and 7), 1*6^2 +/- 1 (35 and 37), and 1*6^3 +/- 1 (215 and 217) are not three sets of twin primes. However, 2*6 +/- 1 (11 and 13), 2*6^2 +/- 1 (71 and 73), and 2*6^3 +/- 1 (431 and 433) are three sets of twin primes. Thus, a(6) = 2.
PROG
(Python)
import sympy
from sympy import isprime
def b(n):
..for k in range(10**8):
....if isprime(k*n+1) and isprime(k*n-1) and isprime(k*(n**2)+1) and isprime(k*(n**2)-1) and isprime(k*(n**3)+1) and isprime(k*(n**3)-1):
......return k
n = 1
while n < 100:
..print(b(n))
..n += 1
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Mar 09 2014
STATUS
approved