OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
3 is in the sequence because 3^6 + 3^5 + 3^4 + 3^3 + 3^2 + 3 - 1 = 1091, which is prime.
MAPLE
A100331:=n->`if`(isprime(-1+add(n^i, i=1..6)), n, NULL): seq(A100331(n), n=1..1000); # Wesley Ivan Hurt, Dec 13 2015
MATHEMATICA
Select[Range[600], PrimeQ[Sum[ #^i, {i, 6}] - 1] &] (* Ray Chandler, Nov 17 2004 *)
PROG
(Magma) [n: n in [0..700] | IsPrime(n^6+n^5+n^4+n^3+n^2+n-1)]; // Vincenzo Librandi, Dec 13 2015
(PARI) is(n) = ispseudoprime(n^6+n^5+n^4+n^3+n^2+n-1) \\ Altug Alkan, Dec 13 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ray G. Opao, Nov 16 2004
STATUS
approved