%I #44 Dec 17 2021 05:35:52
%S 0,0,0,0,0,0,0,0,0,0,1,0,2,1,1,2,5,2,7,3,5,6,12,5,12,10,13,10,22,9,26,
%T 17,21,21,25,17,40,28,33,25,51,25,57,36,41,45,70,37,69,48,65,55,92,52,
%U 81,61,85,78,117,57,126,91,97
%N Genus of modular curve X_1(n).
%C Also the dimension of the space of cusp forms of weight two on Gamma1(n). [_Steven Finch_, Apr 03 2009]
%D F. Hirzebruch et al., Manifolds and Modular Forms, Vieweg, 2nd ed. 1994, p. 161.
%H T. D. Noe, <a href="/A029937/b029937.txt">Table of n, a(n) for n = 1..1000</a>
%H S. R. Finch, <a href="/A000521/a000521_1.pdf">Modular forms on SL_2(Z)</a>, December 28, 2005. [Cached copy, with permission of the author]
%H Chang Heon Kim, Ja Kyung Koo, <a href="http://dx.doi.org/10.1017/S0004972700017755">On the genus of some modular curves of level N</a>, Bull Austral. Math. Soc. 54 (1996) 291-297.
%H A. V. Sutherland, <a href="http://www-math.mit.edu/~drew/MazursTheoremSubsequentResults.pdf">Torsion subgroups of elliptic curves over number fields</a>, 2012. - From _N. J. A. Sloane_, Feb 03 2013
%F a(n) = 1 + A115000(n) - A029935(n)/4, n > 4. [Kim and Koo, Theorem 1]
%p with(numtheory); A029937 := proc(n) local i,j; j := 1+(1/24)*phi(n)*A001615(n); for i in divisors(n) do j := j-(1/4)*phi(i)*phi(n/i) od; j; end;
%t a[n_ /; n<5] = 0; a[n_] := 1+Sum[d^2*MoebiusMu[n/d]/24 - EulerPhi[d]*EulerPhi[n/d]/4, {d, Divisors[n]}]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jan 13 2014 *)
%o (PARI)
%o A029935(n) = {
%o my(f = factor(n), fsz = matsize(f)[1],
%o g = prod(k=1, fsz, f[k,1]),
%o h = prod(k=1, fsz, sqr(f[k,1]-1)*f[k,2] + sqr(f[k,1])-1));
%o return(h*n\sqr(g));
%o };
%o a(n) = {
%o if (n < 5, return(0));
%o my(f = factor(n), fsz = matsize(f)[1],
%o g = prod(k=1, fsz, f[k,1]),
%o h = prod(k=1, fsz, sqr(f[k,1]) - 1));
%o return(1 + sqr(n\g)*h/24 - A029935(n)/4);
%o };
%o vector(63, n, a(n)) \\ _Gheorghe Coserea_, Oct 23 2016
%Y Cf. A001617, A029938. [_Steven Finch_, Apr 03 2009]
%K nonn,nice,easy
%O 1,13
%A _N. J. A. Sloane_