|
|
A106858
|
|
Primes of the form 2x^2+xy+2y^2 with x and y nonnegative.
|
|
2
|
|
|
2, 5, 23, 83, 107, 137, 173, 257, 293, 347, 353, 467, 503, 617, 647, 653, 743, 797, 857, 953, 983, 1223, 1277, 1283, 1307, 1427, 1487, 1493, 1523, 1553, 1637, 1787, 1877, 1913, 1997, 2003, 2027, 2213, 2237, 2243, 2393, 2423, 2447, 2657, 2663
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Discriminant=-15.
|
|
LINKS
|
Vincenzo Librandi, N. J. A. Sloane and Ray Chandler, Table of n, a(n) for n = 1..10000 [First 1000 terms from Vincenzo Librandi, next 1000 terms from N. J. A. Sloane]
|
|
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[2, 1, 2, 350000];
Length[t2]
t2[[Length[t2]]]
For[n=1, n <= 2000, n++, Print[n, " ", t2[[n]]]] (* From N. J. A. Sloane, Jun 17 2014 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Replace Mma program by a correct program, recomputed and extended b-file. - N. J. A. Sloane, Jun 17 2014
|
|
STATUS
|
approved
|
|
|
|