login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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]
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[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
Sequence in context: A173396 A023186 A023188 * A290887 A219889 A369834
KEYWORD
nonn,easy
AUTHOR
T. D. Noe, May 09 2005
EXTENSIONS
Replace Mma program by a correct program, recomputed and extended b-file. - N. J. A. Sloane, Jun 17 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)