G4.2 If $n$ is an integer, and the unit and tens digits of $n^{2}$ are $u$ and 7, respectively, determine the value of $u$.

If $n$ is an integer, and the unit and tens digits of $n^{2}$ are $u$ and 7, respectively, determine the value of $u$.
$$
0^{2}=0,1^{2}=1,2^{2}=4,3^{2}=9,4^{2}=16,5^{2}=25,6^{2}=36,7^{2}=49,8^{2}=64,9^{2}=81
$$

Let $n=10 a+b, n^{2}=(10 a+b)^{2}=100 a+20 a b+b^{2} \equiv 70+u(\bmod 100)$
$u=0,1,4,5,6$ or 9
$20 a b+b^{2} \equiv 70+u(\bmod 100)$
$b(20 a+b) \equiv 70+u(\bmod 100)$
If $b=0$, L.H.S. ≠ R.H.S.
If $b=1,20 a+1 \equiv 71 \Rightarrow 20 a \equiv 70$. No solution
If $b=2,40 a+4 \equiv 74 \Rightarrow 40 a \equiv 70$. No solution
If $b=3,60 a+9 \equiv 79 \Rightarrow 60 a \equiv 70$. No solution
If $b=4,80 a+16 \equiv 76(\bmod 100)$
$80 a \equiv 60(\bmod 100)$
$8 a \equiv 6(\bmod 10)$
$a=2$ or 7 (e.g. $24^{2}=576$ and $74^{2}=5476$ )

If $b=5,100 a+25 \equiv 75 \Rightarrow 100 a \equiv 50$. No solution
If $b=6,120 a+36 \equiv 76(\bmod 100)$
$20 a \equiv 40(\bmod 100)$
$a=2$ or 7 (e.g. $26^{2}=676$ and $76^{2}=5776$ )

If $b=7,140 a+49 \equiv 79 \Rightarrow 140 a \equiv 30$. No solution
If $b=8,160 a+64 \equiv 74 \Rightarrow 160 a \equiv 10$. No solution
If $b=9,180 a+81 \equiv 71 \Rightarrow 180 a \equiv 90$. No solution
Conclusion $u=6$