OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2600
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
KEYWORD
nonn
AUTHOR
Derek Orr, Jan 27 2014
STATUS
approved