Maths Olympiad Prep

Library / /35 of 61

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=7mod9(\pm 4)^2 = 7 \bmod 9, so the condition is necessary.

We exhibit squares which give these values.

0mod90 \bmod 9. Obviously 02=00^2 = 0. We have 92=819^2 = 81, 992=980199^2 = 9801 and in general 9992=(10n1)2=102n210n+1=999800199\ldots9^2 = (10^n - 1)^2 = 10^{2n} - 2 \cdot 10^n + 1 = 99\ldots980\ldots01, with digit sum 9n9n.

1mod91 \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 99982=(10n2)2=102n410n+4=999600499\ldots98^2 = (10^n - 2)^2 = 10^{2n} - 4 \cdot 10^n + 4 = 99\ldots960\ldots04, with digit sum 9n+19n + 1.

4mod94 \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 99972=(10n3)2=102n610n+9=999400999\ldots97^2 = (10^n - 3)^2 = 10^{2n} - 6 \cdot 10^n + 9 = 99\ldots940\ldots09, with digit sum 9n+49n + 4.

7mod97 \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 99952=(10n5)2=102n10n+1+25=999002599\ldots95^2 = (10^n - 5)^2 = 10^{2n} - 10^{n+1} + 25 = 99\ldots90\ldots025, with digit sum 9n29n - 2.

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

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