A182424 Numbers n such that n^4 + n^3 + n^2 + n - 1 is prime.
1, 2, 6, 8, 11, 12, 18, 30, 32, 39, 41, 44, 50, 63, 65, 69, 72, 74, 75, 78, 86, 93, 104, 107, 110, 123, 126, 140, 149, 153, 158, 165, 177, 179, 182, 186, 188, 189, 215, 218, 222, 225, 236, 237, 239, 254, 264, 267, 272, 278, 296, 299, 302, 305, 314, 320, 327, 330
Offset: 1
Keywords
Examples
18^4 + 18^3 + 18^2 + 18 - 1 = 111149 is prime, so 18 is in the sequence.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..7000
Programs
-
Magma
[n: n in [0..400] | IsPrime(s) where s is -1+&+[n^i: i in [1..4 by 1]]]; // Vincenzo Librandi, Aug 10 2014
-
Mathematica
Select[Range[350],PrimeQ[Total[#^Range[4]]-1]&] (* Harvey P. Dale, Aug 09 2014 *)
-
PARI
for (n=1,10^4, p=n^4 + n^3 + n^2 + n - 1; if (isprime(p), print1(n,", "))); /* Joerg Arndt, Apr 28 2012 */
Comments