A082174 Number of primitive reduced indefinite quadratic forms over the integers in two variables with discriminants D(n)=A079896(n).
2, 2, 4, 2, 6, 2, 4, 4, 8, 2, 4, 8, 6, 8, 10, 4, 4, 4, 10, 2, 8, 12, 8, 6, 12, 2, 8, 4, 18, 12, 4, 4, 12, 8, 12, 14, 8, 4, 12, 18, 6, 8, 20, 4, 14, 8, 14, 10, 4, 12, 16, 2, 8, 20, 8, 8, 20, 14, 8, 8, 28, 14, 10, 4, 16, 16, 10, 12, 20, 6, 12, 8, 20, 2, 16, 24, 12, 10, 24, 16, 8, 8, 8, 30
Offset: 1
Keywords
Examples
a(1)=2 because there are two reduced forms for D(1)=A079896(1)=5, namely [a,b,c]=[-1, 1, 1] and [1, 1, -1]; here f(5)=3. a(5)=6: for D(5)=A079896(5)=17 (f(17)=5) the 6 reduced [a,b,c] forms are [[-2, 1, 2], [2, 1, -2], [-2, 3, 1], [-1, 3, 2], [1, 3, -2], [2, 3, -1]]. They are all primitive. a(6)=2: for D(6)=A079896(6)=20 (f(20)=5) there are four reduced forms: [-2, 2, 2], [2, 2, -2], [-1, 4, 1] and [1, 4, -1], but only two of them are primitive, namely [-1, 4, 1] and [1, 4, -1].
References
- A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973, ch.IV, par.31, p. 112 and par.27, p. 97.
Links
- Robin Visser, Table of n, a(n) for n = 1..10000
- Henri Cohen, A Course in Computational Algebraic Number Theory, Grad. Texts in Math., Vol. 138, Springer-Verlag, Berlin, 1993. xii+534 pp. See Definition 5.6.2 on page 257.
Crossrefs
Cf. A082175 (number of reduced forms, nonprimitive forms included).
Programs
-
SageMath
def a(n): i, D, ans = 1, Integer(5), 0 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 (abs(sqrt(D)-2*a)Robin Visser, May 31 2025
Formula
a(n)= number of primitive reduced indefinite binary quadratic forms over the integers for D(n)=A079896(n).
Extensions
Offset corrected and more terms from Robin Visser, May 31 2025
Comments