It is a well-known result that the modular function $1728J(\tau) := \frac{1728E\_4(\tau)^3}{E\_4(\tau)^3-E\_6(\tau)^2}$ has integral values if $\tau$ has class number 1 - for example at $\tau\_{163}:=\frac{1+i\cdot\sqrt{163}}{2}$ you get $1728J(\tau\_{163})=-640320^3$. 


Now define the quasi-modular function $s\_2(\tau):=\frac{E\_4(\tau)}{E\_6(\tau)}\cdot\left(E\_2(\tau)-\frac{3}{\pi Im(\tau)}\right)$.


Then I have looked at all 13 class 1 discriminants and have verified numerically that
$$M(\tau):=s\_2(\tau)\cdot(1728J(\tau)-1728)=\frac{1728E\_4(\tau)E\_6(\tau)}{E\_4(\tau)^3-E\_6(\tau)^2}\left(E\_2(\tau)-\frac{3}{\pi Im(\tau)}\right)$$
also has integral values for all these $\tau\_N$.


For example $M(\tau\_{163})=-2^{13}\cdot3^5\cdot5\cdot7\cdot11\cdot19\cdot23\cdot29\cdot127\cdot181$.


**My Question:**
How can I prove that $M(\tau)\in\mathbb Z$ for all $\tau$ with class number 1?
Or where can I find a proof for it?


*Edit:* After the answer of @Zavosh (thank you!!!) it remains to prove [this](https://mathoverflow.net/questions/301476/why-are-values-of-eisenstein-e-2-algebraic-integers) question. Who can help?



Why does this quasi-modular function have integral values?
Algebraicity is proven in appendix one of [1]. The function considered there is


$$ \psi(\tau) = \frac{3E\_4(\tau)}{2E\_6(\tau)} (E\_2(\tau) - \frac{3}{\pi \rm{Im} \tau}) = \frac{3}{2} s\_2(\tau).$$


The proof is by establishing, for quadratic irrationals $\tau$, the identity
$$ \psi(\tau) = 9j(\tau)\gamma + \frac{3(7j(\tau)-6912)}{2(j(\tau)-1728)}$$
where $\gamma$ is a rational function in the coefficients of the Taylor series of a certain polynomial $\Phi(X,Y)$ around the point $(j(\tau),j(\tau))$ where it vanishes. Then


$$M(\tau) = 1728 s\_2(\tau) (j(\tau)-1) = 1728(j(\tau)-1) ( 6j(\tau)\gamma + \frac{(7j(\tau) - 4\cdot1728)}{j(\tau)-1728}.$$


There is also a different identity for calculations, for when $\tau$ is not equivalent to $i$ or $\rho$, and satisfies
$$ A \tau^2 + B \tau + C = 0$$
with $A,B,C$ coprime positive integers:


$$\psi(\tau) = \frac{-g\_2 S}{Cg\_3 (2A+B\tau)}$$
where $S$ is the sum of $\wp(z)$ as $z$ ranges over $C\tau$-torsion points of $\mathbb{C}/\langle 1,\tau \rangle$.


Masser gives a table of $\psi(\tau)$, for a list of generators of rings of integers of imaginary quadratic fields with class number 1. They are all rational numbers, and one can indeed check that
$$ M(\frac{-1+\sqrt{-163}}{2}) = 223263987730882560,$$
which agrees with the factorization in the question. Also


$$\begin{align}M(\frac{-1+\sqrt{-67}}{2})&=-112852776960=-2^{11}\cdot 3^5 \cdot 5 \cdot 7 \cdot 11 \cdot 19 \cdot 31\\
M(\frac{-1+\sqrt{-43}}{2})&=-627056640=-2^{13}\cdot 3^7 \cdot 5 \cdot 7\\
 M(\frac{-1+\sqrt{-27}}{2})&=-7772161=-1181\cdot 6581\\
 M(\frac{-1+\sqrt{-19}}{2})&=-497664=-2^{11} \cdot 3^5\\
 M(\frac{-1+\sqrt{-11}}{2})&=-14336=-2^{11} \cdot 7\end{align},$$
etc.


Probably one can prove $M(\tau)$ is an algebraic integer by going through Masser's calculations and clearing denominators.


[1] Masser, David W. *Elliptic Functions and Transcendence*


