OFFSET
1,1
COMMENTS
The only prime in this sequence is a(1) = 3.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
381^3 + 381 +- 1 (55305961 and 55305959, respectively) are both prime. Thus, 381 is a member of this sequence.
MATHEMATICA
Select[Range[3000], PrimeQ[#^3 + # - 1] && PrimeQ[#^3 + # + 1] &] (* Vincenzo Librandi, Dec 26 2015 *)
Select[Range[3000], AllTrue[#^3+#+{1, -1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 23 2020 *)
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..5*10^3] |IsPrime(n^3+n-1) and IsPrime(n^3 +n+1)]; // Vincenzo Librandi, Dec 26 2015
(PARI) isok(n) = isprime(n^3+n+1) && isprime(n^3+n-1); \\ Michel Marcus, Dec 27 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Jan 27 2014
STATUS
approved