## S000933

Primes of the form x^2 - xy + 2y^2, but not x^2 + xy + 2y^2, with x and y nonnegative.

7, 29, 67, 113, 179, 191, 277, 347, 359, 379, 449, 457, 571, 631, 701, 709, 863, 883, 911, 947, 1009, 1033, 1129, 1187, 1283, 1327, 1373, 1381, 1453, 1493, 1579, 1801, 1873, 1913, 2017, 2027, 2039, 2087, 2269, 2293, 2389, 2437, 2531, 2543, 2557, 2591, 2671

1

Primes of the form x^2 + xy + 2y^2, but not x^2 - xy + 2y^2, with x and y nonnegative is an empty set. Note that the Mathematica program corrects a problem in the one given in A106856.

T. D. Noe, Plot of 1000 terms

T. D. Noe, Table of 1000 terms

(Mma) QuadPrimes2[a_, b_, c_, lmt_] := Module[{p, d, lst = {}, xMax, yMax}, d = b^2 - 4 a*c; If[a > 0 && c > 0 && d < 0, xMax = Sqrt[lmt/a]*(1 + Abs[b]/Floor[Sqrt[-d]])]; Do[If[4 c*lmt + d*x^2 >= 0, yMax = ((-b)*x + Sqrt[4 c*lmt + d*x^2])/(2 c), yMax = 0]; Do[p = a*x^2 + b*x*y + c*y^2; If[PrimeQ[p] && p <= lmt && ! MemberQ[lst, p], AppendTo[lst, p]], {y, 0, yMax}], {x, 0, xMax}]; Sort[lst]]; Complement[QuadPrimes2[1, -1, 2, 3000], QuadPrimes2[1, 1, 2, 3000]]

Cf. A045373A106856.

nonn

T. D. Noe, Aug 04 2016