login
Primes p of the form : p+p^2+p^3-+4=prime.
3

%I #4 Mar 16 2015 16:29:07

%S 2161,4951,6421,8761,12241,13411,19891,20731,24631,27271,28411,30091,

%T 34981,40471,42331,42901,52021,53731,58111,60631,63361,65701,74611,

%U 83641,90841,95101,98251,103171,104851,119671,120871,131731,132661

%N Primes p of the form : p+p^2+p^3-+4=prime.

%H Harvey P. Dale, <a href="/A154822/b154822.txt">Table of n, a(n) for n = 1..1000</a>

%t lst={};Do[p=Prime[n];If[PrimeQ[p+p^2+p^3-4]&&PrimeQ[p+p^2+p^3+4],AppendTo[lst,p]],{n,2*8!}];lst

%t Select[Prime[Range[15000]],AllTrue[#+#^2+#^3+{4,-4},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Mar 16 2015 *)

%Y Cf. A154821

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Jan 15 2009