applet-magic.com Thayer Watkins Silicon Valley & Tornado Alley USA

The Digit Sum of a Number to Base 10 is Equivalent to Its Remainder Upon Division by 9

For Hjørdis

Lemma 1:
The sum of the digits of any number N to base 10 is equal to N minus some multiple of 9.

Proof:

Let N be any number and let

N = Σ_{i=0} a_{i}*10^{i}

be its representation to base 10. Let S(N) be the sum of its digits, Σ_{i=0} a_{i}.

Consider M=N−S(N). The value of M
is such that

M = Σ_{i=0} a_{i}*10^{i} − Σ_{i=0} a_{i}
M = Σ_{i=0} a_{i}*(10^{i}−1)

For any value of i, (10^{i}−1) is a number which to base 10 is a string of 9's.

Thus

M = Σ_{i=0} a_{i}*(99…9)
M = Σ_{i=0} a_{i}*9(11…1)

Let Σ_{i=0} a_{i}*9(11…1) be denoted as K_{1}. Then

N − S(N) = 9K_{1} and hence
S(N) = N − 9K_{1}

Now let
D(N) be its digit sum of N; i.e., the repeated sum of digits until a single digit is arrived at.

Lemma 2: The digit sum (the iterative sum of the digits) of any N to base 10 is equal to N minus
the highest multiple of 9 that leaves a single digit.

If the procedure of Lemma 1 is applied again the result is

N − 9K_{1} − 9K_{2} = S(S(N))

The procedure can be continued until the sum of digits is a single digit.

N − 9Σ_{j=1}K_{j} = S(…S(N)) = D(N)

The righthand side (RHS) is a single digit. The lefthand side (LHS) must also be a single digit.
The definition of a remainder upon division by p
is the single digit less than p in value. The LHS of the above expression is not quite the remainder of
N divided by 9. It could be equal to 9. But 9 may be considered equivalent to zero as a remainder
upon division by 9. (A digit sum of zero occurs only for the number zero.)

A Generalization

The previous material generalizes for numbers expressed to any integral base k. The digit sum of any
number base k is equivalent to its remainder upon division by (k-1). For binary numbers, number expressed to base 2,
the proposition is true but rather bizarre. The digit sum of any binary number except zero is one and the remainder
of any number upon division by one is zero. However as a remainder one is equivalent to zero for division by one.