login
A236171
Numbers k such that k^2 - k - 1, k^3 - k - 1, and k^4 - k - 1 are all prime.
2
4, 9, 11, 16, 55, 60, 71, 189, 361, 450, 469, 669, 1261, 1351, 1490, 1591, 2101, 2254, 2396, 2594, 3774, 3866, 4011, 5375, 5551, 5840, 6070, 7336, 7545, 7666, 7735, 8105, 8255, 9825, 10525, 11621, 12100, 13084, 13454
OFFSET
1,1
LINKS
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