A236759 Numbers n such that n^4+n-1 is prime.
2, 3, 6, 9, 10, 12, 13, 16, 17, 20, 23, 26, 28, 31, 33, 40, 43, 44, 54, 58, 72, 77, 92, 93, 98, 105, 110, 117, 119, 120, 122, 125, 132, 143, 157, 164, 182, 201, 204, 205, 229, 231, 266, 275, 279, 286, 288, 290, 292, 293, 304, 309, 318
Offset: 1
Keywords
Examples
98^4 + 98 - 1 = 92236913 is prime. Thus, 98 is a member of this sequence.
Programs
-
Mathematica
Select[Range[400],PrimeQ[#^4+#-1]&] (* Harvey P. Dale, Jul 15 2020 *)
-
PARI
s=[]; for(n=1, 400, if(isprime(n^4+n-1), s=concat(s, n))); s \\ Colin Barker, Jan 31 2014
-
Python
import sympy from sympy import isprime {print(n) for n in range(10**3) if isprime(n**4+n-1)}