Principal congruence modular curve genus (source code)

= Principal congruence modular curve genus
{title2=$g(X(N))=1+\frac{N^2(N-6)}{24}\prod_{p\mid N}(1-p^{-2})$}

For $N\geq3$, the <principal congruence subgroup> has projective index $\mu=\frac12N^3\prod_{p\mid N}(1-p^{-2})$, no effective elliptic stabilizers, and all <cusp widths> equal to $N$. Hence the number of cusps is $\mu/N$, and the <genus formula for a modular curve> gives the displayed formula. The exceptional levels one and two both have genus zero; the full genus-zero list is $N=1,2,3,4,5$. Level six has genus one and every larger level has positive genus.