cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A307359 Class number a(n) of indefinite binary quadratic forms with discriminant 4*A000037(n) for n >= 1.

This page as a plain text file.
%I A307359 #19 Jun 07 2025 08:15:37
%S A307359 1,2,1,2,2,2,2,2,2,1,2,4,1,2,2,2,2,2,2,4,2,2,2,1,4,2,2,2,4,4,3,2,4,4,
%T A307359 1,4,2,2,2,2,2,4,2,4,2,1,2,4,4,2,2,2,4,1,2,4,2,4,2,2,2,4,2,4,1,2,4,2,
%U A307359 2,4,6,4,4,2,4,2,2,4,4,1,4,4,2,2,2,4,4,1,2,8,3,4,2,4,4,2
%N A307359 Class number a(n) of indefinite binary quadratic forms with discriminant 4*A000037(n) for n >= 1.
%C A307359 This is a subsequence of A087048, See the formula.
%C A307359 This sequence is relevant for the Pell forms [1, 0, - D(n)], with D(n) = A000037(n) and discriminant 4*D(n).
%C A307359 The Buell reference, Table 2B, pp. 241-243, gives only the class numbers, called there H, for A000037(n) squarefree and not congruent to 1 modulo 4. E.g., a(3), related to discriminant 4*5 = 20, is not treated there; also a(6) for discriminant 32 = 4*(2*2^2) does not appear there.
%C A307359 For the a(n) cycles of primitive reduced forms of discriminant 4*A000037(n) see the W. lang link in A324251, Table 2 and Table 1, for n = 1..30. - _Wolfdieter Lang_, Apr 19 2019
%D A307359 D. A. Buell, Binary Quadratic Forms, Springer, 1989.
%H A307359 Robin Visser, <a href="/A307359/b307359.txt">Table of n, a(n) for n = 1..10000</a>
%F A307359 a(n) gives the number of distinct cycles of primitive reduced forms of discriminant 4*A000037(n).
%F A307359 a(n) = A087048(e(n)), with e(n) the position of the n-th even term of A079896, for n >= 1.
%e A307359 a(1) = 1 because 4*A000037(1) = 4*2 = 8 = A079896(e(1)) with e(1) = 1 and A087048(1) = 1.
%e A307359 a(12) = 4 because the twelfth even number of A079896 is 60 at position e(12) = 22, and A087048(22) = 4.
%e A307359 The cycle for discriminant 8 is [[1, 2, -1], [-1, 2, 1]].
%e A307359 The four 2-cycles for discriminant 60 are  [[1, 6, -6], [-6, 6, 1]], [[-1, 6, 6], [6, 6, -1]], [[2, 6, -3], [-3, 6, 2]] and  [[-2, 6, 3], [3, 6, -2]].
%o A307359 (SageMath)
%o A307359 def a(n):
%o A307359     i, D, S = 1, 4*n + 4*floor(1/2 + sqrt(n)), []
%o A307359     for b in range(1, isqrt(D)+1):
%o A307359         if ((D-b^2)%4 != 0): continue
%o A307359         for a in Integer((D-b^2)/4).divisors():
%o A307359             if gcd([a, b, (D-b^2)/(4*a)]) > 1: continue
%o A307359             Q = BinaryQF(a, b, -(D-b^2)/(4*a))
%o A307359             if all([(not Q.is_equivalent(t)) for t in S]): S.append(Q)
%o A307359     return len(S)  # _Robin Visser_, Jun 01 2025
%Y A307359 Cf. A000037, A079896, A082174, A087048.
%K A307359 nonn
%O A307359 1,2
%A A307359 _Wolfdieter Lang_, Apr 04 2019
%E A307359 a(40) corrected and more terms from _Robin Visser_, Jun 01 2025