Find the greatest number $k$ such that there exists a perfect square that is not a multiple of 10, with its last $k$ digits the same

Find the greatest number $k$ such that there exists a perfect square that is not a multiple of 10, with its last $k$ digits the same

I could find $12^2 = 144$, $38^2 = 1444$, $62^2 = 3844$ and $88^2 = 7744$


Solution 1:

The numbers with this property is infinitly and there is much to say: the last digits in the squares is zero or 4.. if its end in 4 then its cant be more than 3times(3 fours).there is only 4 base numbers in this properety: n=12,38,62,88 but each number of the form n+ 100k alsoend in 44 or 444

Solution 2:

By examination of squares considered $\bmod 1000$, the only possibility of three repeated non-zero digits terminating a square is $444$, arising from values $\{38, 462, 538, 962\} \bmod 1000$. Due to your finding for two repeated end digits, searching for these can just consider the values you found with added multiples of $100$.

Extending this to consider squares of these values with added multiples of $1000$, we find that these give squares ending in $\{1444, 3444, 5444, 7444, 9444\}$ - that is, there are no squares that end with $4$ similar non-zero digits.

This gives $k=3$.