Date: Sat, 7 Mar 1998 16:38:53 -0500

From: Alex Bogomolny

Austin, hello:

What you want to show is that, given a number N,

(sum of digits of N)^{2} = sum of digits of N^{2} (mod 9)

It follows from the above that "sum of the digits of a square" can't be arbitrary but must be a square of something. The only 1-digit squares (mod 9) are 0, 1, 4, 7, 9, as you have noticed. (You can't get 0 as a sum of digits of a non-zero number.)

Why the above is true? Because 10 = 1 (mod 9) and, therefore, the same is true for all powers of 10. So, as you correctly observed, it all boils down to 9 being the last digit in the system.

In other bases the same result will be true if 9 is replaced with the last digit of the system. Therefore, there is always a very specific sequence of 1-digit squares in any system.

If you multiply two squares the result is again a square. So it's not surprising that when you multiply two numbers whose digits add to one of 1,4,7,9, digits of the result also sum up to one of these numbers.

Let s(N) stand for the 1-digit sum of digits of N. Then s(N*M) = s(N)s(M) because the same is true modulo 9. I.e., a = b (mod 9) and c = d (mod 9) implies ac = bd (mod 9).

So, for example, if s(N) = 7 and s(M) = 4, then s(M*N) = s(28) = 1. So your observation with regard to the product is not only true but you also can predict what the sum of the digits of the result will be from the multiples themselves without actually carrying out multiplication.

Best regards,

Alexander Bogomolny

64485581 |