login
A087048
Class number of indefinite quadratic forms over the integers in two variables with discriminant D = D(n) = A079896(n), n>=1.
21
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, 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, 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
OFFSET
1,3
COMMENTS
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>=1.
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)).
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
A primitive form [a,b,c] has gcd(a,b,c)=1.
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
For an online program for D < 10^6 see the Keith Matthews link. - Wolfdieter Lang, Jul 24 2019
Let Cl+(D) and Cl(D) be the narrow class group and the class group of the quadratic order of discriminant D. Then Cl+(D)/Cl(D) = 1 if D < 0 or D > 0 and the fundamental unit has norm -1, C_2 if D > 0 and the fundamental unit has norm 1. - Jianing Song, Nov 24 2025
REFERENCES
D. A. Buell, Binary Quadratic Forms, Springer, 1989.
A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973, ch. 31, pp. 112 ff.
LINKS
Steven R. Finch, Class number theory
Steven R. Finch, Class number theory [Cached copy, with permission of the author]
PARI/GP home, Arithmetic functions. See comments on the qfbclassno() function.
FORMULA
a(n) = A391418(n) if A306638(n) = -1, 2*A391418(n) otherwise. - Jianing Song, Dec 09 2025
EXAMPLE
n=3, D(3) = A079896(3) = 12, a(3) = 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]].
n=14, D(14) = A079896(14) = 40, a(14) = 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]].
n=36, D(36) = A079896(36) = 89, a(36) = 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].
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.
PROG
(SageMath)
def a(n):
i, D, S = 1, Integer(5), []
while(i < n):
D += 1; i += 1*(((D%4) in [0, 1]) and (not D.is_square()))
for b in range(1, isqrt(D)+1):
if ((D-b^2)%4 != 0): continue
for a in Integer((D-b^2)/4).divisors():
if gcd([a, b, (D-b^2)/(4*a)]) > 1: continue
Q = BinaryQF(a, b, -(D-b^2)/(4*a))
if all([(not Q.is_equivalent(t)) for t in S]): S.append(Q)
return len(S) # Robin Visser, May 31 2025
(PARI) QFBclassno(D) = qfbclassno(D) * if (D > 0 && quadunitnorm(D) > 0, 2, 1)
for(n=2, 200, if(n%4 <= 1 && !issquare(n), print1(QFBclassno(n), ", "))) \\ Jianing Song, Nov 24 2025, corrected on Dec 09 2025, copied from the PARI/GP home link; quadunitnorm() requires PARI-GP of version 2.15 or higher
CROSSREFS
See A006374 for another version.
A014600 is the sequence for D < 0.
For class numbers related to fundamental discriminants (A003658): A003656 (1), A094619 (2), A094612 (3), A003652 (list);
For form class numbers related to fundamental discriminants: A003655 (1), A391420 (2), A391421 (3), A003646 (list);
For class numbers related to all discriminants (A079896): A133315 (1), A344408 (2), A344409 (3), A391418 (list);
For form class numbers related to all discriminants: A391423 (1), A391424 (2), A391425 (3), this sequence (list).
Sequence in context: A353362 A256122 A391440 * A109700 A087742 A340996
KEYWORD
nonn
AUTHOR
Wolfdieter Lang, Aug 07 2003
EXTENSIONS
Offset corrected by Robin Visser, May 31 2025
STATUS
approved