User blog comment:DrCocktor/81/@comment-32994025-20190424141015/@comment-35470197-20190424223426

@Nnn6nnn

For any natural numbers n and x satisfying 10^n ≦ x < 10^{n+1}, you have 10^{2n} ≦ x^2 < 10^{2n+2}. Therefore the sum S of the digits of x^2 satisfies 1 ≦ S < (2n+1)9. You have (2n+1)9 < 10^n for any 3. That is why you just need to examine numbers smaller that 1000000. Naruyoko just gave a more effective upperbound.