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!)
A239021 Smallest number k such that k*n +/- 1, k*n^2 +/- 1, and k*n^3 +/- 1 are three sets of twin primes. a(n) = 0 if no such number exists. 0
4, 105525, 10990, 15855, 344190, 2, 74580, 11580, 165592, 3759, 204918, 12670, 99090, 78, 3978, 11655, 8979180, 10605, 55188, 1221, 2, 23340, 4431420, 39158, 58464, 87318, 45420, 15780, 210, 91, 289422, 19740, 186410, 1293, 137664, 747, 443730, 94920, 278278 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Sequence in context: A339450 A273231 A360760 * A193151 A034209 A260614
KEYWORD
nonn
AUTHOR
Derek Orr, Mar 09 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 10 01:04 EDT 2024. Contains 375769 sequences. (Running on oeis4.)