login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
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
Sequence in context: A341953 A341767 A281152 * A360697 A197582 A086277
KEYWORD
nonn
AUTHOR
Derek Orr, Mar 06 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 7 21:10 EDT 2024. Contains 375749 sequences. (Running on oeis4.)