login
A106857
Primes of the form x^2+xy+3y^2, with x and y nonnegative.
2
3, 5, 23, 31, 37, 47, 53, 59, 67, 89, 97, 113, 157, 163, 179, 181, 191, 199, 251, 257, 269, 311, 313, 317, 331, 367, 379, 383, 389, 401, 419, 433, 443, 449, 463, 487, 499, 509, 521, 577, 587, 599, 617, 641, 643, 647, 653, 683, 691, 709, 719, 727, 751, 757
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
A056874 is the main sequence for these primes. Cf. A028954.
Sequence in context: A067256 A136891 A296920 * A106307 A106282 A163153
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