

A238849


Smallest k such that k*n^3  1 and k*n^3 + 1 are twin primes.


0



4, 9, 4, 3, 24, 2, 24, 30, 58, 3, 12, 19, 96, 3, 10, 165, 114, 11, 390, 159, 2, 30, 114, 10, 18, 12, 24, 6, 42, 19, 72, 24, 30, 72, 24, 3, 150, 189, 40, 54, 348, 5, 24, 93, 14, 33, 324, 9, 150, 81, 70, 39, 354, 3, 138, 42, 56, 51, 180, 16, 18, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS

Table of n, a(n) for n=1..62.


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

Cf. A071558, A110559.
Sequence in context: A096415 A189510 A281152 * A197582 A086277 A271948
Adjacent sequences: A238846 A238847 A238848 * A238850 A238851 A238852


KEYWORD

nonn


AUTHOR

Derek Orr, Mar 06 2014


STATUS

approved



