<s>[INST] Can $\,9\!\cdot\!10^n+4\,$ be a perfect square? I think $\,9\!\cdot\!10^n+4\,$ can be a perfect square, since it is $0 \pmod 4$ (a quadratic residue modulo $4$), and $1 \pmod 3$ (also a quadratic residue modulo  $3$).
But when I tried to find if $\;9\!\cdot\!10^n+4\,$ is a perfect square, I didn’t succeed. Can someone help me see if $\;9\!\cdot\!10^n+4\,$ can be a perfect square ?
 [/INST] Assume that $9\cdot10^n+4\equiv4$ is a perfect square.
$9\cdot10^n+4\equiv4\pmod9$, so $9\cdot10^n+4$ can be represented as $(9m-2)^2=81m^2-18m+4$ or $(9m+2)^2=81m^2+18m+4$, where $m\in\mathbb{N}$.
If $9\cdot10^n+4=81m^2-18m+4$, $$10^n=9m^2-2m=m(9m-2)$$
This means that $m$ and $9m-2$ must be powers of $10$.
Clearly, $9m-2>m$ because $m>0$. If $m≠1$, $m\equiv0\pmod{10}$,  but then $9m-2\equiv8\pmod{10}$, which doesn't work. If $m=1$, $9m-2=7$, which also doesn't work.
If $9\cdot10^n+4=81m^2+18m+4$, $$10^n=9m^2+2m=m(9m-2)$$
This means that $m$ and $9m+2$ must be powers of $10$.
Clearly, $9m+2>m$ because $m>0$. If $m≠1$, $m\equiv0\pmod{10}$,  but then $9m+2\equiv2\pmod{10}$, which doesn't work. If $m=1$, $9m+2=11$, which also doesn't work.
Therefore, there is a contradiction and so $9\cdot10^n+4$ cannot be a perfect square.
</s>