San José State University
Thayer Watkins
Silicon Valley
& Tornado Alley

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

For Hjørdis


Let N be any number and let

N = Σi=0 ai*10i

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

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

M = Σi=0 ai*10i − Σi=0 ai
M = Σi=0 ai*(10i−1)

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


M = Σi=0 ai*(99…9)
M = Σi=0 ai*9(11…1)

Let Σi=0 ai*9(11…1) be denoted as K1. Then

N − S(N) = 9K1
and hence
S(N) = N − 9K1

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

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

N − 9K1 − 9K2 = S(S(N))

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

N − 9Σj=1Kj = 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.

HOME PAGE OF applet-magic
HOME PAGE OF Thayer Watkins