%I #33 Feb 17 2022 11:36:03
%S 61,67,113,157,193,197,227,241,257,419,499,587,631,643,653,739,821,
%T 823,859,863,907,929,947,971,997,1019,1039,1051,1087,1181,1187,1217,
%U 1289,1303,1319,1373,1511,1531,1637,1777,1783,1801,1913,1997,2027,2039,2069,2087,2129,2213
%N Primes of the form 8*x^2+x*y-8*y^2.
%C Discriminant = 257. 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.
%D Z. I. Borevich and I. R. Shafarevich, Number Theory
%H Juan Arias-de-Reyna, <a href="/A141167/b141167.txt">Table of n, a(n) for n = 1..10000</a>
%H Peter Luschny, <a href="https://oeis.org/wiki/User:Peter_Luschny/BinaryQuadraticForms#Implementation">Binary Quadratic Forms</a>
%H N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a>: Index to related sequences, programs, references. OEIS wiki, June 2014.
%H D. B. Zagier, <a href="https://doi.org/10.1007/978-3-642-61829-1">Zetafunktionen und quadratische Körper</a>, Springer, 1981.
%e a(6)=197 because we can write 197 = 8*5^2+5*1-8*1^2.
%t q := 8*x^2 + x*y - 8*y^2; pmax = 3000; xmax = xmax0 = 50; ymin = ymin0 = -50; ymax = ymax0 = 50; k = 1.3 (* expansion coeff. for maxima *) ; dx = dy = 2; 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]], dx}, {y, If[ymin == ymin0, ymin, Floor[k*ymin]], If[ymax == ymax0, ymax, Floor[k*ymax]]}, dy]][[2, 1]] // Union; xmax = Max[xx]; ymin = Min[yy]; ymax = Max[yy]; Print[Length[prms], " terms", " xmax = ", xmax, " ymin = ", ymin, " ymax = ", ymax ]]; A141167 = prms (* _Jean-François Alcover_, Oct 26 2016 *)
%o (Sage)
%o # The function binaryQF is defined in the link 'Binary Quadratic Forms'.
%o Q = binaryQF([8, 1, -8])
%o print(Q.represented_positives(2213, 'prime')) # _Peter Luschny_, Oct 26 2016
%Y Numbers of the form 8x^2+xy-8y^2 in A243180.
%Y Cf. A038872 (d=5). A038873 (d=8). A068228, A141123 (d=12). A038883 (d=13). A038889 (d=17). A141111, A141112 (d=65). A141168 (d=257).
%Y For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
%K nonn
%O 1,1
%A Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (sergarmor(AT)yahoo.es), Jun 12 2008