OFFSET
1,6
REFERENCES
H. Davenport, The Higher Arithmetic. Cambridge Univ. Press, 5th edition, 1982, p. 144.
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
Rick L. Shepherd, Binary quadratic forms and genus theory, Master of Arts Thesis, University of North Carolina at Greensboro, 2013.
FORMULA
a(2*n) = A006374(n) for all n > 0. - Robin Visser, May 29 2025
EXAMPLE
From Robin Visser, May 29 2025: (Start)
For n = 6, the a(6) = 2 positive definite reduced binary quadratic forms of discriminant -A014601(6) = -12 are x^2 + 3*y^2 and 2*x^2 + 2*x*y + 2*y^2.
For n = 7, the a(7) = 2 positive definite reduced binary quadratic forms of discriminant -A014601(7) = -15 are x^2 + x*y + 4*y^2 and 2*x^2 + x*y + 2*y^2.
For n = 8, the a(8) = 2 positive definite reduced binary quadratic forms of discriminant -A014601(8) = -16 are x^2 + 4*y^2 and 2*x^2 + 2*y^2. (End)
PROG
(SageMath)
def a(n):
D, ans = 2*n+1-(n+1)%2, 0
for b in range(-isqrt(D/3), isqrt(D/3)+1):
if ((D+b^2)%4 != 0): continue
for a in Integer((D+b^2)/4).divisors():
if ((abs(b)==a) or (a^2==(D+b^2)/4)) and (b < 0): continue
if (a >= abs(b)) and (a^2 <= (D+b^2)/4): ans += 1
return ans # Robin Visser, May 29 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Sean A. Irvine, Mar 19 2017
Name clarified and offset corrected by Robin Visser, May 29 2025
STATUS
approved
