Maths Olympiad Prep

Library / Iberoamerican Mathematical Olympiad /33 of 57

Iberoamerican Mathematical Olympiad

Number theory Difficulty 5.8 AIME, harder Prove it Ibero-American Mathematical Olympiad

Problem:
Find all possible values for the sum of the digits of a square.

Solution

Solution:
02=00^2 = 0, (±1)2=1(\pm 1)^2 = 1, (±2)2=4(\pm 2)^2 = 4, (±3)2=0(\pm 3)^2 = 0, (±4)2=7 mod 9(\pm 4)^2 = 7 \bmod 9, so the condition is necessary.

We exhibit squares which give these values.

0 mod 90 \bmod 9. Obviously 02=00^2 = 0. We have 92=819^2 = 81, 992=980199^2 = 9801 and in general 99…92=(10n−1)2=102n−2⋅10n+1=99…980…0199\ldots9^2 = (10^n - 1)^2 = 10^{2n} - 2 \cdot 10^n + 1 = 99\ldots980\ldots01, with digit sum 9n9n.

1 mod 91 \bmod 9. Obviously 12=11^2 = 1 with digit sum 11, and 82=648^2 = 64 with digit sum 1010. We also have 982=960498^2 = 9604, 9982=996004998^2 = 996004, and in general 99…982=(10n−2)2=102n−4⋅10n+4=99…960…0499\ldots98^2 = (10^n - 2)^2 = 10^{2n} - 4 \cdot 10^n + 4 = 99\ldots960\ldots04, with digit sum 9n+19n + 1.

4 mod 94 \bmod 9. Obviously 22=42^2 = 4 with digit sum 44, and 72=497^2 = 49 with digit sum 1313. Also 972=940997^2 = 9409 with digit sum 2222, 9972=994009997^2 = 994009 with digit sum 3131, and in general 99…972=(10n−3)2=102n−6⋅10n+9=99…940…0999\ldots97^2 = (10^n - 3)^2 = 10^{2n} - 6 \cdot 10^n + 9 = 99\ldots940\ldots09, with digit sum 9n+49n + 4.

7 mod 97 \bmod 9. Obviously 42=164^2 = 16, with digit sum 77. Also 952=902595^2 = 9025, digit sum 1616, 9952=990025995^2 = 990025 with digit sum 2525, and in general 99…952=(10n−5)2=102n−10n+1+25=99…90…02599\ldots95^2 = (10^n - 5)^2 = 10^{2n} - 10^{n+1} + 25 = 99\ldots90\ldots025, with digit sum 9n−29n - 2.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.