For how many positive integers does it hold that is a multiple of 9 and the sum of the squares of 's digits is also a multiple of 9?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let n be any positive integer where n < 1 0 0 0 . Since n can be expressed using 3 digits, we let the first digit be a , the second be b , and the third be c . This includes the possibility of leading zeros. Note that the condition of n being a multiple of 9 is equivalent to 1 0 0 a + 1 0 b + c ≡ 0 ( m o d 9 ) . Since 1 0 0 ≡ 1 ( m o d 9 ) and 1 0 ≡ 1 ( m o d 9 ) , the previous congruence implies a + b + c ≡ 0 ( m o d 9 ) (we could also have reached this via the divisibility rule for 9). What we are looking for are n which satisfy precisely two conditions: a + b + c a 2 + b 2 + c 2 ≡ 0 ( m o d 9 ) ≡ 0 ( m o d 9 ) The strategy will be to identify in which cases n satisfies the second condition, and then out of those, see when the first condition is also satisfied. We start by examining the squares of digits modulo 9: 0 2 1 2 2 2 4 2 ≡ 9 2 ≡ 3 2 ≡ 6 2 ≡ 0 ( m o d 9 ) ≡ 8 2 ≡ 1 ( m o d 9 ) ≡ 7 2 ≡ 4 ( m o d 9 ) ≡ 5 2 ≡ 7 ( m o d 9 ) This shows that the only possible residues (modulo 9) of squared digits (and in fact any squared integers) are Q = { 0 , 1 , 4 , 7 } . Since we require a 2 + b 2 + c 2 ≡ 0 ( m o d 9 ) , we look for ways to take three assignments of a 2 , b 2 , c 2 to elements of Q (with replacement) such that the three numbers sum to a multiple of 9. This can be worked out by hand, and there are exactly four ways to do this (up to the order of the summands):
Finally, we go through each of these four cases and find choices of a , b , c which also satisfy a + b + c ≡ 0 ( m o d 9 ) :
Suppose we have case 1. Then, each of a , b , c are one of 0, 3, 6 and 9. We see that we cannot have an even number of 3's or an even number of 6's, as the resulting digit sum would not be a multiple of 9. Also, we cannot have exactly one 3 and no 6 or exactly one 6 and no 3. All remaining possibilities are satisfactory, and we classify them using the following three subcases:
Thus, in this case, we have 7 + 2 + 1 2 = 2 1 total possibilities.
Suppose we have case 2. Then, two of the digits are 1 or 8, and the remaining digit is 4 or 5. We examine the three distinct possibilities (up to the order of the digits) of assigning the two digits which are 1 or 8.
Therefore, we conclude that case 2 yields no solutions.
Suppose we have case 3. Then, two of the digits are 2 or 7, and the remaining digit is 1 or 8. Just as in case 2, we examine the three distinct possibilities of assigning the two digits which are 1 or 8. We check, by the exact same type of analysis, that there are no solutions for this case.
Suppose we have case 4. Then, two of the digits are 4 or 5, and the remaining digit is 2 or 7. As before, we examine the three distinct possibilities of assigning the two digits which are 4 or 5. We check, by the exact same type of analysis, that there are no solutions for this case.
Therefore, the only possibilities are the 2 1 from case 1.