OFFSET
1,1
EXAMPLE
a(1) = 4 because for k = 1, 1*(1^3) - 1 = 0 and 1*(1^3) + 1 = 2 are not twin primes, for k = 2, 1 and 3 are not twin primes, for k = 3, 2 and 4 are not twin primes, so the smallest k that works is k = 4: 4*(1^3) - 1 = 3 and 4*(1^3) + 1 = 5 are twin primes.
PROG
(Python)
import sympy
from sympy import isprime
def f(n):
..for k in range(1, 10**4):
....if isprime(k*(n**3)-1) and isprime(k*(n**3)+1):
......return k
n = 1
while n < 10**3:
..print(f(n))
..n += 1
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Mar 06 2014
STATUS
approved