A141165 Primes of the form 9*x^2+7*x*y-5*y^2.
3, 5, 11, 17, 19, 43, 61, 71, 83, 97, 103, 149, 151, 167, 181, 233, 271, 277, 293, 307, 311, 337, 367, 373, 397, 401, 409, 421, 431, 433, 457, 463, 467, 491, 557, 569, 587, 631, 641, 661, 673, 683, 701, 733, 743, 751, 757, 769, 787, 821, 859, 863, 883, 911
Offset: 1
Keywords
Examples
a(10)=97 because we can write 97= 9*3^2+7*3*1-5*1^2
References
- Z. I. Borevich and I. R. Shafarevich, Number Theory
- D. B. Zagier, Zetafunktionen und quadratische Körper
Links
- Juan Arias-de-Reyna, Table of n, a(n) for n = 1..10000
- Peter Luschny, Binary Quadratic Forms
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Crossrefs
Programs
-
Mathematica
q := 9*x^2 + 7*x*y - 5*y^2; pmax = 1000; xmax = xmax0 = 50; ymin = ymin0 = -50; ymax = ymax0 = 50; k = 1.3 (expansion coeff. for maxima *); prms0 = {}; prms = {2}; While[prms != prms0, xx = yy = {}; prms0 = prms; prms = Reap[Do[p = q; If[2 <= p <= pmax && PrimeQ[p], AppendTo[xx, x]; AppendTo[yy, y]; Sow[p]], {x, 1, If[xmax == xmax0, xmax, Floor[k*xmax]]}, {y, If[ymin == ymin0, ymin, Floor[k*ymin]], If[ymax == ymax0, ymax, Floor[k*ymax]]}]][[2, 1]] // Union; xmax = Max[xx]; ymin = Min[yy]; ymax = Max[yy]; Print[Length[prms], " terms", " xmax = ", xmax, " ymin = ", ymin, " ymax = ", ymax ]]; A141165 = prms (* Jean-François Alcover, Oct 26 2016 *)
-
PARI
is_A141165(p)=qfbsolve(Qfb(9,7,-5),p) \\ Returns nonzero (actually, a solution [x,y]) iff p is a member of the sequence. For efficiency it is assumed that p is prime. - M. F. Hasler, Jan 27 2016
-
Sage
# uses[binaryQF] # The function binaryQF is defined in the link 'Binary Quadratic Forms'. Q = binaryQF([9, 7, -5]) print(Q.represented_positives(911, 'prime')) # Peter Luschny, Oct 26 2016
Comments