login
Prime numbers p such that x^2 + x + p produces primes for x = 0..3 but not x = 4.
7

%I #10 Nov 17 2024 19:27:46

%S 5,101,227,1091,1481,1487,3917,4127,4787,8231,9461,10331,11777,12107,

%T 14627,16061,20747,25577,27737,29021,32297,33347,35531,35591,36467,

%U 38447,39227,41177,42461,44267,44531,49031,59441,69191,77237,79811,80777,93251,93491

%N Prime numbers p such that x^2 + x + p produces primes for x = 0..3 but not x = 4.

%C The first term is A164926(4).

%H T. D. Noe, <a href="/A210362/b210362.txt">Table of n, a(n) for n = 1..1000</a>

%t lookfor = 4; t = {}; n = 0; While[Length[t] < 50, n++; c = Prime[n]; i = 1; While[PrimeQ[i^2 + i + c], i++]; If[i == lookfor, AppendTo[t, c]]]; t

%t Select[Prime[Range[10000]],AllTrue[#+{2,6,12},PrimeQ]&&!PrimeQ[#+20]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Mar 26 2015 *)

%t Select[Prime[Range[10000]],Boole[PrimeQ[#+{2,6,12,20}]]=={1,1,1,0}&] (* _Harvey P. Dale_, Nov 17 2024 *)

%Y Cf. A067774, A164926, A210360, A210361, A210363, A210364, A210365.

%K nonn

%O 1,1

%A _T. D. Noe_, Apr 05 2012