A256945 Number of periods of reduced indefinite binary quadratic forms with discriminant D(n) = A079896(n).
1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 3, 2, 1, 2, 1, 2, 3, 4, 2, 1, 2, 2, 4, 1, 2, 2, 2, 3, 1, 2, 2, 4, 4, 2, 2, 1, 2, 2, 6, 1, 1, 2, 4, 4, 1, 4, 1, 2, 3, 4, 2, 2, 5, 2, 4, 2, 4, 1, 4, 2, 4, 4, 1, 2, 3, 4, 1, 6, 2, 2, 4, 4, 2, 1, 4, 2, 6, 1, 2, 2, 2, 4, 8, 1, 1, 3, 2, 4, 4, 4, 2, 2, 2, 4, 2, 4
Offset: 1
Keywords
Examples
a(6) gives the number of cycles of reduced indefinite forms of discriminant D(6) = 20. This is the sum A087048(1) + A087048(6) = 2.
References
- J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, 3rd. ed. See Section 3.3 on page 359.
Links
- Robin Visser, Table of n, a(n) for n = 1..10000
Programs
-
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(): 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
Formula
a(n) is the sum A087048(m) over all integers m with D(m)= D(n)/k^2 for some integer k.
Extensions
Offset corrected and more terms from Robin Visser, May 31 2025
Comments