Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #26 Jul 26 2022 21:59:20
%S 2,7,13,17,23,29,43,73,79,83,127,193,227,239,263,277,337,359,373,397,
%T 439,457,479,503,557,563,617,919,967,1009,1129,1187,1249,1297,1327,
%U 1429,1493,1553,1579,1657,1663,1979,1987,2069,2243,2383,2617,2663,2789
%N Primes p such that p^4 + p^3 + p^2 + p + 1 is prime.
%C Primes in A049409. - _Vincenzo Librandi_, Aug 07 2010
%C The generated prime numbers are in A190527. - _Bernard Schott_, Dec 20 2012
%H Jon E. Schoenfield, <a href="/A065509/b065509.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Harry J. Smith).
%e a(4) = 17 because 17 is prime and 17^4 + 17^3 + 17^2 + 17 + 1 = 88741 is prime.
%t f[n_]:=1+n+n^2+n^3+n^4; lst={}; Do[p=Prime[n]; If[PrimeQ[f[p]], AppendTo[lst,p]], {n,6!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Jul 24 2009 *)
%t Select[Prime[Range[500]],PrimeQ[Total[#^Range[0,4]]]&] (* _Harvey P. Dale_, Apr 08 2017 *)
%o (PARI) { n=0; for (m=1, 10^9, p=prime(m); if (isprime(p^4 + p^3 + p^2 + p + 1), write("b065509.txt", n++, " ", p); if (n==1000, return)) ) } \\ _Harry J. Smith_, Oct 20 2009
%o (PARI) {A065509_vec(N,p=1)=vector(N,i,until(isprime((p^5-1)\(p-1)),p=nextprime(p+1));p)} \\ _M. F. Hasler_, Mar 03 2020
%o (Magma) [n: n in [0..10000]| IsPrime(n) and IsPrime(n^4+n^3+n^2+n+1)] // _Vincenzo Librandi_, Aug 07 2010
%Y Cf. A053182.
%K easy,nonn
%O 1,1
%A _Vladeta Jovovic_, Nov 26 2001