# Twisted modular equation

Let $\gamma_2(\tau)=j(\tau)^{1/3}$. The modular equation shows that the functions $$j\left(\frac{a\tau+b}{c\tau+d}\right),\qquad ad-bc=n$$ are integral over $\mathbf Z[j]$. Under what conditions is the function $$\gamma_2\left(\frac{a\tau+b}{c\tau+d}\right)$$ integral over $\mathbf Z[\gamma_2]$?

Weber shows in Lehrbuch der Algebra that this is true for the functions $$\gamma_2\left(\frac{a\tau+b}{d}\right)$$ where $$\begin{pmatrix} a & b\\ 0 &d\end{pmatrix}\in\mathcal S(n,d)=\bigg\lbrace \begin{pmatrix} r & s\\ 0 &t\end{pmatrix}\colon rt=n,r>0,(r,s,t)=1,3\mid s,0\leq s<3t\bigg\rbrace,$$ for $d=3$ and $(3,n)=1$.

The set $\mathcal S(n,d)$ is a set of representatives for the orbits of the action $SL_2(\mathbf Z)\backslash\lbrace \text{matrices with determinant n}\rbrace$ provided $(n,d)=1$. Unfortunately the function $\gamma_2$ is not invariant under $SL_2(\mathbf Z)$ but only under the subgroup

$$\bigg\lbrace \begin{pmatrix} a & b\\ c &d\end{pmatrix}\colon a\equiv d\equiv 0 \text{ or }b\equiv c \text{ mod 3}\bigg\rbrace$$ so we cannot proceed as with the $j$-invariant.

How did Weber come up with the set $S(n,d)$? For $d=16$ this set also occurs in Stark's On the “gap” in a theorem of Heegner. Is there some other reference for $\mathcal S(n,d)$?

Since nobody has answered yet, I'll try it. I think that if $j(M \cdot \tau)$ satisfies the $n$-th modular equation $\Phi_n(X) = 0$ over $\mathbb{Z}[j]$ (where $\mathrm{det}(M) = n$) then $\gamma_2(M \cdot \tau)$ satisfies $\Phi_n(X^3) = 0$, also over $\mathbb{Z}[j]$ and therefore over the larger ring $\mathbb{Z}[\gamma_2]$. So it is always algebraic over $\mathbb{Z}[\gamma_2]$.
It may be better to view $\gamma_2$ as a modular form of level 1 with character. You can read the character off of the character of $\eta(\tau)$ because $\gamma_2(\tau) = E_4(\tau) \eta(\tau)^{-8}$. In particular the subgroup that you wrote under which $\gamma_2$ is invariant is too small; it should be the group generated by $S$ and $T^3$.
I do not know whether there is a name for elements of $\mathcal{S}(n,d)$ in general. If $(n,d) = 1$ then these are the matrices in Hermite normal form.