login
A236524
Numbers n such that n^3 - n +/- 1 are twin primes.
3
2, 4, 11, 14, 15, 21, 31, 35, 41, 45, 111, 130, 136, 140, 155, 176, 189, 221, 230, 239, 274, 316, 406, 414, 441, 465, 466, 504, 521, 561, 570, 580, 584, 591, 686, 689, 696, 759, 834, 836, 860, 869, 904, 960, 1026, 1159, 1379, 1539, 1614, 1625, 1660
OFFSET
1,1
LINKS
EXAMPLE
561^3 - 561 + 1 (176557921) and 561^3 - 561 - 1 (176557919) are twin primes. Thus, 561 is a member of this sequence.
MATHEMATICA
Select[Range[2000], PrimeQ[#^3 - # - 1] && PrimeQ[#^3 - # + 1] &] (* Vincenzo Librandi, Jan 30 2018 *)
PROG
(Python)
import sympy
from sympy import isprime
{print(n) for n in range(10**4) if isprime(n**3-n-1) and isprime(n**3-n+1)}
(Magma) [n: n in [1..2000] | IsPrime(n^3-n-1) and IsPrime(n^3-n+1)]; // Vincenzo Librandi, Jan 30 2018
CROSSREFS
Intersection of A126421 and A236477.
Sequence in context: A018525 A102935 A287210 * A295968 A038193 A227456
KEYWORD
nonn
AUTHOR
Derek Orr, Jan 27 2014
STATUS
approved