San José
State University |
---|

applet-magic.comThayer WatkinsSilicon Valley, Tornado Alley & the Gateway to the Rockies USA |
---|

Weighted Digit Sumsand Remainders |
---|

Let n be the decimal representation of a number, The sum of its digits can be computed. If that sum is more than one digit ln length
then the sum of its digits is computed and the process repeated until the result is a single digit. That result is called the *digit sum*
of n, say DS(n).

The remarkable fact is that DS(n) is essentially the remainder upon the division of n by 9. For example, let n be 38. The sum of its digits is 11. The sum of the digits of 11 is 2. Thus the digit sum of 38 is 2. The remainder of the division of 38 by 9 is, in fact, 2.

The *essentially* provision comes because the digit sum could be 9 and that corresponds to the remainder being zero.
So 9=0 in digit sum arithmetic.

For other digits besides 9 the sum of the digits must be a weighted sum. For a two digit number 10a+b the weighted sum is h*a+b, where h is the weight and for the digit m h is equal to 10-m.

For example, for m=8 h is equal to 2. Then for n=45 the weighted sum of the digits of 45 is 2*4+5=13 and the weighted sum of the digits of 13 is 2*1+3=5. And the remainder for the division of 45 by 8 is 5.

Now consider n=72. The weighted sum of the digits of 72 is 2*7+2=16 and the weighted sum of the digits of 16 is 8. But the remainder of the division of 72 by 8 is 0. So 8=0 for the weighted digit sums of numbers with respect to 8.

The situation is however a bit more complicated. Just as 8=0, 9=1. For example let n=33. Then WDS_{8}(33)=9, but the division
of 33 by 8 gives a remainder of 1.

For m=7 its weight is 3. Then WDS_{7}(26)=WDS_{7}(12)=5 and the remainder for the division of 26 by 7 is 5.
However for m=7, 7=0, 8=1 and 9=2.

For m=6 the weight is 4. The WDS_{6}(34)=WDS_{6}(16)=WDS_{6}(10)=4. The remainer for
the division of 34 by 6 is 4. Now consider WDS_{6}(49)=WDS_{6}(25)=WDS_{6}(13)=7.
But for m=6, 7=1 and the remainder for the division of 49 by 6 is 1.

For m=5 the weight is 5. The WDS_{5}(27)=WDS_{5}(17)=WDS_{5}(12)=7 but for m=5, 7=2.

However in a previous HOME PAGE OF *applet-magic*

HOME PAGE OF *Thayer Watkins*