OFFSET
1,2
COMMENTS
The sequence contains 60491 terms <= 10^6.
The corresponding sequence of primes begins 3, 29, 1553, 4679, 16103, 22619, 111149, 837929, 1082399, 2374319, 2896403, 3835259, 6377549, 16007039, ...
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..7000
EXAMPLE
18^4 + 18^3 + 18^2 + 18 - 1 = 111149 is prime, so 18 is in the sequence.
MATHEMATICA
Select[Range[350], PrimeQ[Total[#^Range[4]]-1]&] (* Harvey P. Dale, Aug 09 2014 *)
PROG
(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 */
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Apr 28 2012
STATUS
approved