A006374 Number of positive definite reduced binary quadratic forms of discriminant -4*n.
1, 1, 2, 2, 2, 2, 2, 3, 3, 2, 4, 4, 2, 4, 4, 4, 4, 3, 4, 6, 4, 2, 6, 6, 3, 6, 6, 4, 6, 4, 6, 7, 4, 4, 8, 8, 2, 6, 8, 6, 8, 4, 4, 10, 6, 4, 10, 8, 5, 7, 8, 6, 6, 8, 8, 12, 4, 2, 12, 8, 6, 8, 10, 8, 8, 8, 4, 12, 8, 4, 14, 9, 4, 10, 10, 10, 8, 4, 10, 14, 9, 4, 12, 12, 4, 10, 12, 6, 12, 10, 8
Offset: 1
Examples
a(5) = 2 because the two forms F = [a,2*b,c] with discriminant Disc = -4*5 = -20 are [1,0,5] and [2,2,3]. ([2,-2,3] is not reduced, (-2,2,-3) is not positive definite). - _Wolfdieter Lang_, Mar 31 2019
References
- J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 360.
- A. Hurwitz and N. Kritikos, transl. with add. material by W . C. Schulz, "Lectures on Number Theory", Springer-Verlag, New York, 1986, p. 186.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Robin Visser, Table of n, a(n) for n = 1..10000
Programs
-
Sage
def a(n): ans = 0 for b in range(-isqrt(n/3), isqrt(n/3)+1): for a in Integer(n+b^2).divisors(): if ((2*abs(b)==a) or (a^2==n+b^2)) and (b < 0): continue if (a >= 2*abs(b)) and (a^2 <= n+b^2): ans += 1 return ans # Robin Visser, May 29 2025
Formula
a(n) = A006371(2*n) for all n > 0. - Robin Visser, May 29 2025
Extensions
Name clarified by Wolfdieter Lang, Mar 31 2019
Comments