login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Denominator of H(n), where H(0)=-1/12, H(n) = number of equivalence classes of positive definite quadratic forms a*x^2+b*x*y+c*y^2 with discriminant b^2-4ac = -n, counting forms equivalent to x^2+y^2 (resp. x^2+x*y+y^2) with multiplicity 1/2 (resp. 1/3).
3

%I #30 Jul 12 2017 15:17:31

%S 12,1,1,3,2,1,1,1,1,1,1,1,3,1,1,1,2,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,

%T 1,1,2,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,

%U 1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

%N Denominator of H(n), where H(0)=-1/12, H(n) = number of equivalence classes of positive definite quadratic forms a*x^2+b*x*y+c*y^2 with discriminant b^2-4ac = -n, counting forms equivalent to x^2+y^2 (resp. x^2+x*y+y^2) with multiplicity 1/2 (resp. 1/3).

%C H(n) is usually called the Hurwitz class number.

%C a(n) = 1 unless n is of the form 3k^2 or 4k^2. - _Charles R Greathouse IV_, Apr 25 2013

%D D. Zagier, The Eichler-Selberg Trace Formula on SL_2(Z), Appendix to S. Lang, Introduction to Modular Forms, Springer, 1976.

%H Charles R Greathouse IV, <a href="/A058306/b058306.txt">Table of n, a(n) for n = 0..10000</a>

%H N. Lygeros, O. Rozier, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Lygeros/lygeros5.html">A new solution to the equation tau(rho) == 0 (mod p)</a>, J. Int. Seq. 13 (2010) # 10.7.4.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Hurwitz_class_number">Hurwitz class number</a>.

%F H(n) = A259825(n) / 12. - _Michael Somos_, Jul 05 2015

%e -1/12, 0, 0, 1/3, 1/2, 0, 0, 1, 1, ...

%t terms = 100; gf[m_] := With[{r = Range[-m, m]}, -2 Sum[(-1)^k*x^(k^2 + k)/(1 + (-x)^k)^2, {k, r}]/EllipticTheta[3, 0, x] - 2 Sum[(-1)^k*x^(k^2 + 2 k)/(1 + x^(2k))^2, {k, r}]/EllipticTheta[3, 0, -x]]; CoefficientList[ gf[terms // Sqrt // Ceiling] + O[x]^terms, x]/12 // Denominator (* _Jean-François Alcover_, Apr 02 2017, after _Michael Somos_ *)

%o (PARI) H(n)=sumdiv(core(n,1)[2],d,my(D=-n/d^2);if(D%4<2,qfbclassno(D)/max(1,D+6)))

%o a(n)=if(n,denominator(H(n)),12) \\ _Charles R Greathouse IV_, Apr 25 2013

%o (PARI) a(n)=if(n,my(D=4-valuation(n,3)%2);denominator(if(issquare(n/D) && n%D==0, qfbclassno(-D)/max(1,6-D))),12) \\ _Charles R Greathouse IV_, Apr 25 2013

%o (PARI) {a(n) = denominator( qfbhclassno( n))}; /* _Michael Somos_, Jul 06 2015 */

%Y Cf. A058305, A259825.

%K nonn,frac,easy

%O 0,1

%A _N. J. A. Sloane_, Dec 09 2000