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$$

New contributor
wwdbhjcv is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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

New contributor
rooh byda is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Nice claim. Prove it. Nov 25 at 16:59
• It is an easy prove.each number n can written n=a+10b+100c, where is a,b are the last to digits and c is the other concatinate digits, then n^2=(a+10b+100c)^2 =a^2+20ab+100(b^2+2ac+20bc+100c^2) we note that the 2 end digit in n^2 is not relating to c only relate to a and b,then must test only the case when 2 end digits of interval[0,99]^2 are the same. Its happen when k= 12, 38, 62, 88 if n^2 has the same end 2 digits then must be n=k+100c Nov 25 at 18:00

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$$.

• It's also easy to show that $x^2 \equiv (500-x)^2 \equiv (500+x)^2 \equiv (1000-x)^2 \bmod 1000$, meaning that only values up to $250$ need to be checked, with the other possibilities inferred from the above, in the first step above for three similar digits. A corresponding argument also applies to the search for four similar digits. Nov 26 at 6:42