login
Number of primitive Zagier-reduced indefinite quadratic forms over the integers in two variables with discriminants D(n) = A079896(n).
2

%I #9 Jan 22 2017 16:33:37

%S 1,2,3,3,5,4,4,6,7,5,5,10,7,10,11,9,6,8,10,7,10,16,12,11,16,8,10,12,

%T 21,17,8,10,14,14,18,21,13,12,14,27,11,16,26,15,17,18,23,16,10,20,25,

%U 11,13,32,14,18,26,27,18,18,38,24,15,18,28

%N Number of primitive Zagier-reduced indefinite quadratic forms over the integers in two variables with discriminants D(n) = A079896(n).

%C An indefinite quadratic form in two variables over the integers, A*x^2 + B*x*y + C*y^2 with discriminant D = B^2 - 4*A*C > 0, 0 or 1 (mod 4) and not a square, is called Zagier-reduced if A>0, C>0, and B>A+C.

%C This definition is from Zagier's 1981 book, and differs from the older and more common notion of reduced form due to Lagrange (see A082175 for this definition).

%C A form is primitive if its coefficients are relatively prime.

%D D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.

%e For D=20, the a(5)=4 Zagier-reduced are x^2+6*x*y+4*y^2, 4*x^2+6*x*y+y^2 4*x^2+10*x*y+5*y^2, and 5*x^2+10*x*y+4*y^2.

%t Table[Length[

%t Select[Flatten[

%t Select[

%t Table[{a, k}, {k,

%t Select[Range[Ceiling[-Sqrt[n]], Floor[Sqrt[n]]],

%t Mod[# - n, 2] == 0 &]}, {a,

%t Select[Divisors[(n - k^2)/4], # > (Sqrt[n] - k)/2 &]}],

%t UnsameQ[#, {}] &], 1],

%t GCD[#[[1]], #[[2]] +

%t 2*#[[1]], #[[1]] + #[[2]] - (n - #[[2]]^2)/(4*#[[1]])] == 1 &]], {n,

%t Select[Range[

%t 153], ! IntegerQ[Sqrt[#]] && (Mod[#, 4] == 0 || Mod[#, 4] == 1) &]}]

%Y Cf. A079896, A082174, A257003.

%K nonn

%O 0,2

%A _Barry R. Smith_, Apr 17 2015