OFFSET
1,1
COMMENTS
All terms == 1 mod 6. - Robert Israel, Jan 11 2015
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..6730
EXAMPLE
a(1) = 7:
0^4 + 0^3 + 0^2 + 0 + 7 = 7;
1^4 + 1^3 + 1^2 + 1 + 7 = 11;
2^4 + 2^3 + 2^2 + 2 + 7 = 37;
3^4 + 3^3 + 3^2 + 3 + 7 = 127;
4^4 + 4^3 + 4^2 + 4 + 7 = 347;
5^4 + 5^3 + 5^2 + 5 + 7 = 787;
all six are primes.
MAPLE
select(p -> andmap(isprime, [p, p+4, p+30, p+120, p+340, p+780]), [seq(6*i+1, i=1..10^5)]); # Robert Israel, Jan 11 2015
MATHEMATICA
Select[f=k^4 + k^3 + k^2 + k; k = {0, 1, 2, 3, 4, 5}; Prime[Range[2000000]], And @@ PrimeQ[#+f] &]
Select[Prime[Range[20000]], AllTrue[#+{4, 30, 120, 340, 780}, PrimeQ]&] (* Harvey P. Dale, Dec 24 2023 *)
PROG
(PARI) forprime(p=1, 500000, if( isprime(p+0)& isprime(p+4)& isprime(p+30)& isprime(p+120)& isprime(p+340)& isprime(p+780), print1(p, ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Jan 11 2015
STATUS
approved