OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
3866^2 - 3866 - 1, 3866^3 - 3866 - 1, and 3866^4 - 3866 - 1 are all prime, so 3866 is a member of this sequence.
MATHEMATICA
Select[Range[15000], And @@ PrimeQ[#^Range[2, 4] - # - 1] &] (* Amiram Eldar, Mar 21 2020 *)
PROG
(Python)
import sympy
from sympy import isprime
{print(n) for n in range(10**5) if isprime(n**2-n-1) and isprime(n**3-n-1) and isprime(n**4-n-1)}
(PARI)
s=[]; for(n=1, 20000, if(isprime(n^2-n-1) && isprime(n^3-n-1) && isprime(n^4-n-1), s=concat(s, n))); s \\ Colin Barker, Jan 20 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Jan 19 2014
STATUS
approved