The number $38$ is the least positive integer with the property that its square ends with three fours $(38^2=1444)$. The number $38$ is the least positive integer with the property that its square ends with three fours $(38^2=1444)$ . What is the next least positive integer with such property?
I began with writing down $1000x+444=y^2$. This tells that the number is a perfect square divisibly by 4. Also, since the last digit is 4, the only possible last digit of the number is either 2 or 8 only. Hence, I reduced the possibilities to
$?12,?28,?32,?48,...,?92$ where ? is the third digit. I can't find a way to find for the third digit. Or is there any easier way of doing this?
 A: $x^2\equiv444\mod1000\implies x^2\equiv4\mod 8$ and $x^2\equiv69 \mod 125$
$\implies x\equiv \pm2\mod 8$ and $x\equiv \pm 38\mod 125$.
Solving these shows the next solution is $x\equiv 462\mod 1000$.
A: HINT.-Just to exhibit another way.
The digit $a_0$ should be $2$ or $8$.
►$x=10^3M+10^2a_2+10a_1+2\Rightarrow x^2=10^3X+100a_1^2+400a_2+40a_1+4=10^3Y+444$ where $M,X$ and $Y$ are integers.This implies $$100a_1^2+40a_1+400a_2=1000Y+440\iff a_1^2+4a_2=10Y+\frac{110-10a_1}{25}$$ Hence $a_1=1$ or $a_1=6$ (in order the fraction be an integer).The value $a_1=1$ is discarded because it gives $4a_2=10Y+3$. But $a_1=6$ gives $34+4a_2=10Y$ whose solutions are  $a_2=4$ and $a_2=9$.
Thus the only solutions ending in $2$ and having at least three digits are all the integers ending in $462$ and $962$.
Similarly  with
►$x=10^3M+10^2a_2+10a_1+8$
We get $5a_1^2+8a_1-69=0$ so $a_1=3\text { and }-\dfrac{23}{5}$ then $a_1=3$ is the only solution for $a_1$. The other digit $a_2$ can be calculated as follows
$$x^2=10^4a_2^2+76\cdot10^2a_2+1444=10^3Y+444$$ so we get $$10a_2^2+\frac{76}{10}a_2+1\in\mathbb N$$ and the only solution is now $a_2=5$.
In short there are only four natural integers whose squares end in $444$ (being the fourth digit other than $4$) which are $38,538,462$ and $962$.
A: There exist $4$ roots by CRT lifting $\,x^2\equiv 38^2\,$ mod $\,8\,$ & $\,125.\,$ We know two: $\, 38\,$ & $\,-38\equiv 962.\,$ The other two are $\,38\!+\!\color{#c00}{500}\equiv 538\,$ and $\,-538 \equiv 462\,$ by $\,(x\!+\!\color{#c00}{500})^2\equiv x^2\pmod{\!1000}.\,$ So $462$ is next.
