How can I find the minimum value of $|5^{4m+3}-n^2 |$ for positive integers $n,m$.
Is there any short answer for this problem?
How can I find the minimum value of $|5^{4m+3}-n^2 |$ for positive integers $n,m$.
Is there any short answer for this problem?
Clearly for $m=0,n=11$ we have $|5^{4m+3}-n^2 |=4.$
Then we only need to check the four cases $|5^{4m+3}-n^2 |=0,1,2,3.$
Note that $n^2≡0,1,4,5,6,9\mod10$ and $5^{4m+3}≡5\mod10 $ for any $n,m\in\Bbb{Z}_0^+.$
Hence only possible values for the last digit of $|5^{4m+3}-n^2 |$ are $0,1,4,5.$
Therefore remains are the cases $|5^{4m+3}-n^2 |=0,1.$
Note that for any $m\in\Bbb{Z}_0^+,$ $$5^{4m}≡625\mod10000,\\ 5^{4m+1}≡3125\mod10000,\\ 5^{4m+2}≡5625\mod10000,\\ 5^{4m+3}≡8125\mod10000.$$ Hence $5^{4m+3}$ always have the last digits as $8125.$
Suppose $n^2$ have the last three digits $125.$
Then $n$ is of the form $n=10k+5$ for some positive integer $k.$ $$100k^2+100k+25=1000l+125,\\ k(k+1)=10l+1.$$ Since LHS is always even this is a contradiction.
Hence $|5^{4m+3}-n^2 |\not=0$ for any $n,m\in\Bbb{Z}_0^+.$
Can we find $n\in\Bbb{N}$ such that $n^2≡8126\mod10000$ or $n^2≡8124\mod10000$?
There are no integers whose squares last two digits are $26.$ $$n^2≡24\mod100 \iff n≡\pm 18\mod50.$$ $$n^2≡124\mod1000 \iff n≡\pm 182\mod500.$$ But note that $n^2≡8124(\mod10000)\implies n$ is even and $n^2/4≡2031\mod2500.$
There is no integer with last two digits of the square is $31.$
Hence $|5^{4m+3}-n^2 |\not= 1$ for any $n,m\in\Bbb{Z}_0^+.$