Thayer Watkins
Silicon Valley
& Tornado Alley

The Sum of Digits for the Division of Numbers

In previous material it was shown that the digit sum of the product of two integers is equal to the digit sum of the product of the digit sums of the two integers.

DigitSum(a*b) = DigitSum(DigitSum(a)*DigitSum(b))

This extends to decimal numbers of a finite number of digits. The question dealt with here is to what extent can the digit sum arithmetic be extended to division.

Division by a number means multiplication by the multiplicative inverse of the number. (Usually this multiplicative inverse is called the reciprocal of the number.) If the reciprocal of the divisor is a terminated decimal the digit sum arithmetic applies completely. For example, consider 23/2 = 23*(0.5) = 11.5. The digit sum of 11.5 is 7. The digit sum of 23 is 5 and this times 5, the digit sum of 0.5, gives 25, which has the digit sum of 7. Likewise for division by 4. Consider 15/4 = 15*(0.25) = 3.75. The digit sum of 3.75 is 6. The digit sum of 15 and 0.25 are 6 and 7, respectively. The product of these digit sum is 42, which has a digit sum of 6. This applies to division by 8. The reciprocal of 8 is 0.125 which has the digit sum of 8. So division by 8 in digit sum artithmetic is equivalent to multiplication by 8. For instance, 66/8 = 8.25. The digit sum of 8.25 is 6. The digit sum of 66 is 3. Multiplying this by 8 gives 24, which has a digit sum of 6. Also the digit sum arithmetic applies to division by 5. For example, 19/5 = 19*(0.2) = 3.8. The digit sum of 3.8 is 2. The digit sums of 19 and 0.2 are 1 and 2, so the digit sum of their product is also 2.

When the reciprocal has a non-terminating decimal the matter is entirely different. Consider division by 3. The reciprocal of 3 is the non-terminationg decimal (0.333...). This does not have a digit sum. The attempt to compute its digit sum results in the endless cycling {3,6,9,3,6,9,,,}. If one considers the sequence of approximations to 0.333...; i.e., 0.3, 0.33, 0.333 and so forth, in each case 24*(0.3), 24*(0.33), 24*(0.333) the digit sum of the product is 9. So there is an unending sequence of 9's with a limit of 9 yet the result for the product of 24 with 0.333... is 8.

Consider the conditions DigitSum(0.333...) would have to satisfy. For example, 25/3 = 25*(0.333...) = 8.333... Thus,

8 + DigitSum(0.333...) = DigitSum(7*DigitSum(0.333...))
and hence
DigitSum(6*DigitSum(0.333...)) = 8


24/3 = 24*(0.333...) = 8
and thus
8 = DigitSum(6*DigitSum(0.333...))

But it would also have to satify

27/3 = 27*(0.333...) = 9
which implies
9 = DigitSum(9*DigitSum(0.333...))
and furthermore
22/3 = 22*(0.333...) = 7.333...
7 + DigitSum(0.333...) = DigitSum(4*DigitSum(0.333...))

Therefore the assumption that DigitSum(0.333...) is defined appears to lead to contradictions.

However, suppose we did not know that DigitSum(1/5)=2 and tried to deduce from conditions such as those above.

25/5 = 25*(1/5) = 5
5 = DigitSum(7*DigitSum(1/5))
so, one might think that
DigitSum(1/5) = 5/7

Yet we know that DigitSum(1/5)=2 so 7*2=14, which has a digit sum of 5.

For another example consider

26/5 = 26*(1/5) = 5.2
7 = DigitSum(8*DigitSum(1/5))
and therefore it might seem that
DigitSum(1/5) = 7/8

This shows that what might appear to be a contradiction in digit sum arithmetic may, in fact, not be a contradiction.

It is shown elsewhere that digit sum arithmetic is mathematically equivalent to modulo 9 arithmetic. The crucial matter for division is the existence of a multiplicative inverse for an element; i.e. an element such that the product with the given element yields the multiplicative identity 1. In the table below the cases of products that yield the multiplicative identity are shown in red.

Multiplication Table for Modulo 9 Arithmetic
808765432 1

Clearly 3, 6 and 9 do not have multiplicative inverses. The case of 7 is problematical. Seven does have a multiplicative inverse; i.e., 4. Division by 7 in digit sum arithmetic should be equivalent to multiplication by 4. In the case of multiples of 7 this is true. For example, 35/7=5; the digit sum of the quotient is 5 and the digit sum of 35 is 8. When 8 is multiplied by 4 the result is 32, which has the digit sum of 5. But the decimal reciprocal of 7 is 0.142857142857..., an unending repetition of the sequence 142857. An attempt to compute the digit sum of 1/7 would yield the cycle {1,5,7,6,2,9,...}. So, for example, the digit sum of 22/7 would not be defined. Conditions that DigitSum(1/7) would have to satisfy are

28/7 = 3
4 = DigitSum(1*DigitSum(1/7))

But also

22/7 = 3 + 1/7
3 + DigitSum(1/7) = DigitSum(4*DigitSum(1/7))
which implies
3 = DigitSum(3*DigitSum(1/7))
which is consistent with DigitSum(1/7)=4.

Consider now 23/7. The result of the division is 3+2/7. Using DigitSum(1/7)=4 this would mean DigitSum(23/7)=DigitSum(3+2*4)=2. And the digit sum of DigitSum(23)*4=DigitSum(20)=2. Likewise 18/7=2+4/7 so DigitSum(18/7)=DigitSum(2+4*DigitSum(1/7))=DigitSum(2+16)=9. And DigitSum(DigitSum(18)*DigitSum(1/7)=DigitSum(9*4)=9. It definitely appears that DigitSum(1/7) as being equal to 4 is consistent with digital sum arithmetic.

With the knowledge of how the digit sum of division by 7 worked out let us now reconsider division by 3. Consider the following proposed rule:

DigitSum(a/3) = DigitSum(DigitSum(a)*4/3)

where a%3 stands for the remainder when a is divided by 3.

Take for example a=24. Then DigitSum(24/3)=DigitSum(8)=8. But DigitSum(24)=6 and 6*4/3=8. Since 24%3=0, the right-hand side (RHS) is equal to 8. So the rule is correct in this instance. Try a=36. Then DigitSum(36/3)=DigitSum(12)=3. The RHS is DigitSum(9*4/3)=DigitSum(12)=3. Try a=42. The DigitSum(42/3)=DigitSum(14)=5. The RHS is DigitSum(6*4/3)=8. Try a=123. Then DigitSum(123/3)=DigitSum(41)=5. On the other side, DigitSum(123)=3 and 3*4/3=4, but 123% .

The above observations may be summarized in a table:

Equivalency in Digit Sum Arithmetic
Division by:Is Equivalent to
Multiplication by:

Let this functional relationship be expressed as Eqiv(b); i.e., Equiv(2)=5, Equiv(4)=7 and so forth.

Division by Multidigit Divisors

If a divisor has a terminating decimal reciprocal then the digit sum of the quotient follows the same rules as for a single digit divisor. For example, division by 16 is equivalent to multiplication by 0.0625. This number, 0.0625, has the digit sum of 4 so the digit sum of the quotient for division by 16 can be found by multiplying the digit sum of the dividend by 4 and taking the digit sum of the result. The result is even neater than this because the digit sum of 16 is 7 and the rule is the same as for division by 7. Thus the rule is

DigitSum(a/b) = DigitSum(DigitSum(a)*Eqiv(DigitSum(b))
if Equiv(DigitSum(b)) exists.

So 50/16=3.125 has a digit sum of 2. The digit sum of 50 is 5. This multiplied by 4 gives 20 which has the digit sum of 2.

Consider for another example, 90/32=2.8125. The digit sum of this is 9. The digit sum of 90 is 9. The digit sum of 32 is 5 and Equiv(5)=2, so the RHS of the above reduces to DigitSum(18)=9.

It was found above that even though division by 7 results in nonterminating decimals digit sum arithmetic applies because 7 has a multiplicative inverse of 4 modulo 9. Consider a multiple of 7, say 14. The digit sum of 14 is 5 so division by 14 is equivalent to multiplication by 2. For example, 42/14=3. The digit sum of the dividend is 6 and 6 muliplied by 2 gives 12 which has the digit sum of 3. However for division by 21 there is no rule because the digit sum of 21 is 3 and 3 has no equivalency. Thus the above rule cannot be applied to 42/21. However this case would fit a proposed rule of

DigitSum(a/b) = DigitSum(DigitSum(a)/DigitSum(b))

Consider 63/21=3. The digit sum of 63 and that divided by 3, the digit sum of 21 gives a result of 3. But 84/21=4 does not fit the proposed rule since the digit sum of 84 is 3 and 3 divided by 3 is 1, not 4. (It is true that the sum of the digits of 84 is 12 and this divided by 3 is 4. But 126/42=3 the sum of the digits of 126 is 9 and this procedure does not give the correct result.)

Thus division by multiples of 7 follows digit sum arithmetic if the digit sum of the multiple of 7 is not 3, 6 or 9. Thus 70/35=2 and the digit sum of 35 is 8 so the result should be the same as the digit sum of 7*8=56 which is 2 and it is.

Thus digit sum arithmetic can be extended to multidigit divisors providing that they are not multiples of 3.

(To be continued.)

HOME PAGE OF applet-magic
HOME PAGE OF Thayer Watkins