A006375 Number of equivalence classes of cycles (or periods) of reduced indefinite binary quadratic forms of determinant -n (see comments).
2, 1, 1, 3, 2, 1, 1, 2, 4, 2, 1, 2, 2, 1, 2, 5, 2, 2, 1, 3, 2, 1, 1, 3, 6, 2, 2, 2, 2, 2, 1, 3, 2, 2, 2, 7, 3, 1, 2, 4, 2, 2, 1, 2, 4, 1, 1, 4, 6, 3, 2, 3, 2, 2, 2, 3, 2, 2, 1, 4, 2, 1, 3, 8, 4, 2, 1, 3, 2, 2, 1, 5, 2, 2, 3, 2, 2, 2, 2, 5, 8, 3, 1, 4, 4, 1, 2, 3, 2, 4, 2, 2, 2, 1, 2, 5
Offset: 1
Examples
From _Robin Visser_, Jun 08 2025: (Start) For n = 1, every indefinite binary quadratic form of determinant -1 (equivalently discriminant 4) is equivalent to either 2*x*y - y^2 or 2*x*y, thus a(1) = 2. For n = 2, every indefinite binary quadratic form of determinant -2 (equivalently discriminant 8) is equivalent to x^2 + 2*x*y - y^2, thus a(2) = 1. For n = 3, every indefinite binary quadratic form of determinant -3 (equivalently discriminant 12) is equivalent to x^2 + 2*x*y - 2*y^2, thus a(3) = 1. For n = 4, every indefinite binary quadratic form of determinant -4 (equivalently discriminant 16) is equivalent to either x^2 + 2*x*y - 3*y^2, 4*x*y - 2*y^2, or 4*x*y, thus a(4) = 3. (End)
References
- J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 362.
- C. F. Gauss, Disquisitiones arithmeticae, Yale University Press, New Haven, Conn.-London, 1966.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Nachum Dershowitz, Touchard's Drunkard, Journal of Integer Sequences, Vol. 20 (2017), #17.1.5.
Programs
-
SageMath
def a(n): S = [] for b in range(1, ceil(sqrt(n))): for a in Integer(n-b^2).divisors(): c = (b^2-n)/a F = [BinaryQF(x,2*b,y) for (x,y) in [(a,c),(-a,-c),(c,a),(-c,-a)]] if all([(not Q.is_equivalent(t)) for t in S for Q in F]): S.append(F[0]) if Integer(n).is_square(): for c in range(-sqrt(n), sqrt(n)+1): F = [BinaryQF(x,2*sqrt(n),y) for (x,y) in [(0,c),(0,-c),(c,0),(-c,0)]] if all([(not Q.is_equivalent(t)) for t in S for Q in F]): S.append(F[0]) return len(S) # Robin Visser, Jun 06 2025
Extensions
Corrected Apr 15 1995
Name clarified by Robin Visser, May 30 2025
Term a(65) corrected and more terms from Robin Visser, Jun 06 2025
Comments