OFFSET
1,1
COMMENTS
All numbers are congruent to 4 mod 10, 6 mod 10, or 8 mod 10.
EXAMPLE
23518 = 29^3-29^2-29-1 (29 is prime) and 23518^3-23518^2-23518-1 = 13007166227989 is prime. Thus, 23518 is a member of this sequence.
MATHEMATICA
f[n_] := n^3 - n^2 - n - 1; f[ Select[ Prime@ Range[2, 740], PrimeQ@ f@ f@#&]] (* Robert G. Wilson v, Mar 07 2014 *)
PROG
(Python)
import sympy
from sympy import isprime
{print(n**3-n**2-n-1) for n in range(10**4) if isprime(n) and isprime((n**3-n**2-n-1)**3-(n**3-n**2-n-1)**2-(n**3-n**2-n-1)-1)}
(PARI)
s=[]; forprime(p=2, 40000, n=p^3-p^2-p-1; if(isprime(n^3-n^2-n-1), s=concat(s, n))); s \\ Colin Barker, Feb 10 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Feb 09 2014
STATUS
approved