Let $X_0(N)$ be the modular curve associated to a congruence subgroup $\Gamma_0(N)$. If $N=p$ is a prime, then there are two cusps $0$ and $\infty$ on $X_0(N)$. Suppose that $p>7$ so that the genus of $X_0(p)$ is positive.

I'd like to compute the order of the image of the divisor $0-\infty$ in $J_0(p)$, the Jacobian variety of $X_0(p)$. It is well-known that it is the numerator of $\frac{p-1}{12}$.

The computation is as follows: First, consider the eta quotient $$ g(a, b)=\eta(z)^a \eta(pz)^b $$ for some $a, b \in \mathbb{Q}$, where $\eta(z)$ is the Dedekind's eta function. Then, $g(a, b)$ is a modular function on $X_0(p)$ if and only if all of the following are satisfied. (cf. Proposition 1 in the paper by Ling, "On the Q_rational cuspidal subgroup and the component group of J0(pr)" published in Israel Journal of Mathematics 99 (1997), 29--54)

- $a, b \in \mathbb{Z}$.
- $a+pb \in 24\mathbb{Z}$.
- $pa+b \in 24\mathbb{Z}$.
- $a+b=0$.
- $b \in 2\mathbb{Z}$.

Thus, $a=-b=\frac{24k}{p-1} \in 2\mathbb{Z}$ for some $k\in \mathbb{Z}$. The smallest possible $k$ is $n=\frac{p-1}{\gcd(12, p-1)}$, the numerator of $\frac{p-1}{12}$.

Next, let $a=\frac{24n}{p-1}$ and consider $\mathrm{div}~ g(a, -a)$, the principal divisor on $X_0(N)$ associated to $g(a, -a)$. By direct computation, we have $$ \mathrm{div}~ g(a, -a)= \frac{(p-1)a}{24}(0-\infty)=n(0-\infty). $$ Thus, by definition the order of the image of $0-\infty$ is a divisor of $n$.

Last, suppose that the image of $m(0-\infty)$ in $J_0(p)$ is zero. By definition, there is a modular function $f$ on $X_0(p)$ such that $\mathrm{div}~f=m(0-\infty)$. Since $m$ can be taken as a divisor of $n$, let $n=mk$ for some $k\in \mathbb{Z}$. In order to prove the order of the image of $0-\infty$ is $n$, we have to show that $k=1$.

In this situation, we have $$ \mathrm{div}~ f^k=mk(0-\infty)=n(0-\infty)=\mathrm{div} ~g(a, -a). $$ Thus, the function $\frac{f^k}{g(a, -a)}$ is a constant because it has no zeros or poles on $X_0(p)$. So, we have $f^k=A \cdot g(a, -a)$ for some $A\in \mathbb{C}^*$.

My question is here:

Q. **How can we deduce $k=1$ in this situation?**

If we could take $k$-th roots on both sides, we would have $f=A^{1/k}\cdot g(a/k, -a/k)$. If so, then $g(a/k, -a/k)$ is also a modular function on $X_0(p)$ because $f$ is a modular function. By the discussion above $a$ is the smallest such one, so $a/k=a$, i.e., $k=1$, as desired. A generalization of my question is as follows:

"**Let $f$ be a (meromorphic) function on a compact Riemann surface $X$ and let $g^k$ be a function on $X$ for some $k\in \mathbb{Z}$. If $f^k=g^k$, then is it true that $g$ is also a function on $X$?**"