OFFSET
1,1
COMMENTS
Discriminant = 148. Class = 3. Binary quadratic forms a*x^2+b*x*y+c*y^2 have discriminant d=b^2-4ac and gcd(a,b,c)=1.
REFERENCES
Z. I. Borevich and I. R. Shafarevich, Number Theory.
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. OEIS wiki, June 2014.
D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.
EXAMPLE
a(4)=137 because we can write 137= 3^2+12*3*4-4^2.
MATHEMATICA
q := x^2 + 12*x*y - y^2; pmax = 2000; xmax = 100; ymin = -xmax; ymax = xmax; k = 1; 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, k*xmax}, {y, k *ymin, k *ymax}]][[2, 1]] // Union; xmax = Max[xx]; ymin = Min[yy]; ymax = Max[yy]; k++; Print["k = ", k, " xmax = ", xmax, " ymin = ", ymin, " ymax = ", ymax ]]; A141163 = prms (* Jean-François Alcover, Oct 26 2016 *)
PROG
(Sage)
# The function binaryQF is defined in the link 'Binary Quadratic Forms'.
Q = binaryQF([1, 12, -1])
print(Q.represented_positives(1973, 'prime')) # Peter Luschny, Oct 26 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (sergarmor(AT)yahoo.es), Jun 13 2008
STATUS
approved