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.

A006374 Number of positive definite reduced binary quadratic forms of discriminant -4*n.

This page as a plain text file.
%I A006374 M0214 #31 May 30 2025 19:28:33
%S A006374 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,
%T A006374 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,
%U A006374 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
%N A006374 Number of positive definite reduced binary quadratic forms of discriminant -4*n.
%C A006374 In Hurwitz and Kritikos (HK) a definite form a*x^2 + 2*b*x*y + c*y^2, denoted by f(a,b,c), has discriminant Delta = -D = b^2 - 4*a*c < 0. Usually this is F = [a,2*b,c] with discriminant Disc = 4*(b^2 - a*c) = 4*Delta. A definite form is reduced if 2*|b| <= a <= c, and if any of the inequalities reduces to an equality then b >= 0 (HK, p. 179). The positive definite case has a > 0 and c  > 0. Here the forms F do not need to satisfy gcd(a,2*b,c) = 1. - _Wolfdieter Lang_, Mar 31 2019
%D A006374 J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 360.
%D A006374 A. Hurwitz and N. Kritikos, transl. with add. material by W . C. Schulz, "Lectures on Number Theory", Springer-Verlag, New York, 1986, p. 186.
%D A006374 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A006374 Robin Visser, <a href="/A006374/b006374.txt">Table of n, a(n) for n = 1..10000</a>
%F A006374 a(n) = A006371(2*n) for all n > 0. - _Robin Visser_, May 29 2025
%e A006374 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
%o A006374 (Sage)
%o A006374 def a(n):
%o A006374     ans = 0
%o A006374     for b in range(-isqrt(n/3), isqrt(n/3)+1):
%o A006374         for a in Integer(n+b^2).divisors():
%o A006374             if ((2*abs(b)==a) or (a^2==n+b^2)) and (b < 0): continue
%o A006374             if (a >= 2*abs(b)) and (a^2 <= n+b^2): ans += 1
%o A006374     return ans  # _Robin Visser_, May 29 2025
%Y A006374 Cf. A006371, A006375, A096446, A096445.
%K A006374 nonn,nice,easy
%O A006374 1,3
%A A006374 _N. J. A. Sloane_
%E A006374 Name clarified by _Wolfdieter Lang_, Mar 31 2019