%I #41 Jan 02 2023 16:21:05
%S 1,1,2,1,1,1,2,2,2,1,2,2,1,2,1,2,2,2,1,1,2,2,4,1,2,1,2,2,1,2,2,2,2,2,
%T 2,1,2,2,4,1,1,2,4,2,1,2,1,1,2,4,2,1,2,2,2,2,4,1,4,2,4,3,1,2,2,4,1,4,
%U 2,1,4,4,2,1,2,2,2,1,2,2,2,2,4,1,1,2,2,4,4,2,2,1,2,2,2,4,4,4,2,3,2,1,2,2,4
%N Class numbers of indefinite quadratic forms over the integers in two variables with discriminant D = D(n) = A079896(n), n>=0.
%C An indefinite quadratic form over the integers in two variables F(x,y) := a*x^2 + b*x*y + c*y^2 has discriminant D := b^2 - 4*a*c >0 not a square (a and c non-vanishing); that is D=D(n)= A079896(n) = [5,8,12,13,17,20,21,...], n>=0.
%C For a given discriminant D from A079896(n) a reduced form [a,b,c] is defined by b>0 and f(D)-min(|2*a|,|2*c|) <= b < f(D), with f(D) := ceiling(sqrt(D)).
%C For a given discriminant D from A079896(n) every primitive reduced form [a,b,c] defines a periodic chain of such forms by applying repeatedly the transformation R(t)*[a,b,c]=[a'(t),b'(t),c'(t)]=[c,-b+2*c*t,F(-1,t)] with uniquely defined t= ceiling((f(D)+b)/(2*c))-1 if c>0 and t=-(ceiling((f(D)+b)/(2*|c|)-1)) if c<0. The number of such (different) periodic chains of primitive reduced forms is called the class number for this (indefinite) discriminant D from A079896(n). - _Wolfdieter Lang_, Jun 07 2013
%C A primitive form [a,b,c] has gcd(a,b,c)=1.
%C See the Appendix 2 of the Buell reference. pp. 235-243, for the class numbers, called H(D), for the fundamental discriminants 0 < D < 10000. Table 2A gives the class numbers for squarefree D == 1 (mod 4) and Table 2B the ones for D == 0 (mod 4), with D/4 squarefree and not congruent to 1 modulo 4 (compare Buell, p. 69, 1. and 2.). - _Wolfdieter Lang_, May 29 2013
%C For an online program for D < 10^6 see the Keith Matthews link. - _Wolfdieter Lang_, Jul 24 2019
%D D. A. Buell, Binary Quadratic Forms, Springer, 1989.
%D A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973, ch. 31, pp. 112 ff.
%H S. R. Finch, <a href="http://www.people.fas.harvard.edu/~sfinch/">Class number theory</a>
%H Steven R. Finch, <a href="/A000924/a000924.pdf">Class number theory</a> [Cached copy, with permission of the author]
%H Keith Matthews, <a href="http://www.numbertheory.org/php/classnopos0.html"> Finding the class number h(d) of primitive binary quadratic forms of positive discriminant d</a> Wolfdieter Lang, <a href="/A087048/a087048.pdf"> Table for n=0, ..., 135</a>
%e n=2, D(2) = A079896(2) = 12, a(2) = 2 because there are the following two periodic chains of primitive reduced forms [a,b,c] (both with period length 2): [[-2, 2, 1], [1, 2, -2]] and [[-1, 2, 2], [2, 2, -1]].
%e n=13, D(13) = A079896(13) = 40, a(13) = 2 because there are the following two periodic chains of primitive reduced forms [a,b,c] (with period length 6 resp. 2): [[-3, 2, 3], [3, 4, -2], [-2, 4, 3], [3, 2, -3], [-3, 4, 2], [2, 4, -3]] and [[-1, 6, 1], [1, 6, -1]].
%e n=35, D(35) = A079896(35) = 89, a(35) = 1 because there is only one periodic chain of primitive reduced forms [a,b,c] (with period length 14): [[ -5, 3, 4], [4, 5, -4], [-4, 3, 5], [5, 7, -2], [-2, 9, 1], [1, 9, -2], [-2, 7, 5], [5, 3, -4], [-4, 5, 4], [4, 3, -5], [-5, 7, 2], [2, 9, -1], [-1, 9, 2], [2, 7, -5]]. See p. 116 of the Scholz/Schoeneberg reference which starts with the form [1, 9, -2].
%e n=62, D(62) = A079896(62) = 148, a(62) = 3 because there are three periodic chains of primitive reduced forms [a,b,c] (with period length 6 and 6 and 2, resp.): [[-7, 6, 4], [4, 10, -3], [-3, 8, 7], [7, 6, -4], [-4, 10, 3], [3, 8, -7]] and [[-4, 6, 7], [7, 8, -3], [-3, 10, 4], [4, 6, -7], [-7, 8, 3], [3, 10, -4]] and [[-1, 12, 1], [1, 12, -1]]. See p. 116 of the Scholz/Schoeneberg reference which starts with the forms [4, 10, -3] and [3, 10, -4] and [1, 12, -1], resp.
%Y See A006374 for another version. Cf. A079896.
%K nonn
%O 0,3
%A _Wolfdieter Lang_, Aug 07 2003