OFFSET
1,1
COMMENTS
Discriminant=-11.
LINKS
N. J. A. Sloane and Vincenzo Librarndi, Table of n, a(n) for n = 1..10000 [First 3000 terms from Vincenzo Librarndi]
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
MATHEMATICA
QuadPrimes2[a_, b_, c_, lmt_] := Module[{p, d, lst = {}, xMax, yMax}, d = b^2 - 4a*c; If[a > 0 && c > 0 && d < 0, xMax = Sqrt[lmt/a]*(1+Abs[b]/Floor[Sqrt[-d]])]; Do[ If[ 4c*lmt + d*x^2 >= 0, yMax = ((-b)*x + Sqrt[4c*lmt + d*x^2])/(2c), yMax = 0 ]; Do[p = a*x^2 + b*x*y + c*y^2; If[ PrimeQ[ p] && !MemberQ[ lst, p], AppendTo[ lst, p]], {y, 0, yMax}], {x, 0, xMax}]; Sort[ lst]];
t2 = QuadPrimes2[1, 1, 3, 1000]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
T. D. Noe, May 09 2005
EXTENSIONS
Replaced defective Mma program, extended b-file. - N. J. A. Sloane, Jun 16 2014
STATUS
approved