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)$?