applet-magic.com
Thayer Watkins
Silicon Valley
USA

 Digit Sum Arithmetic for Division by a Number Whose Digit Sum is a Multiple of 3

## Digit Sum Arithmetic Does Not Apply Directly for Division by a Number Whose Digit Sum is a Multiple of 3

In previous material it was shown that the digit sum of the quotient of an integer or a terminating decimal number divided by 2,4,5,7, or 8 can be obtained by a simple procedure; i.e., multiplying the digit sum of the dividend by an appropriate integer. For example to obtain the digit sum of quotient of a number divided by 2 simply multiply the digit sum of the dividend by 5 and take the digit sum of the result. For example, consider 47/2. The digit sum of the dividend is 4+7→11→1+1→2. Multiply 2 by 5 to get 10 which has the digit sum of 1. To check calculate 47/2. It is 23.5, the sum of the digits of which is 10 giving a digit sum of 1. Likewise the digit sum of quotient of a number divided by 4 is simply the digit sum of the dividend multiplied by 7. For example, 19/4=4.75, which has a sum of digits of 16 leading to a digit sum of 7. The digit sum of the dividend is 1 and this multiplied by 7 gives a digit sum of 7.

No such rule exists for the digits 3, 6 and 9. To investigate the situation for division by these three digits it is convenient to define a special function closely related to the remainder function.

 Integer Digit Sum Remainder Function Mod 9 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 0 10 1 1 11 2 2 12 3 3 13 4 4 14 5 5 15 6 6 16 7 7 17 8 8 18 9 0

The only difference between the values in the second and third columns is that for a multiple of 9 the remainder function is zero but in the second column the value is 9. This is reasonable in that 9=0 mod 9. Let the remainder function be expressed as k%9 and the second column function as k#9. Rather than make a special case for the multiples of 9 it is more elegant to express the correspondence between the two functions as

#### k#9 = (k-1)%9 + 1

So DigitSum(k) = k#9 = (k-1)%9 +1. The # function can be generalized to

## Digit Sums for Division by 3

For any dividend other than a multiple of 3 division will result in unending decimals such as 0.3333... or 0.6666.... The digit sums for these nonterminating decimals are undefined. So only multiples of 3 will be considered here, say 3k. We want to know how the digit sums for k and 3k are related. The following table indicates the pattern.

 k DS(k) 3k DS(3k) ratio 1 1 3 3 1/3 2 2 6 6 1/3 3 3 9 9 1/3 4 4 12 3 4/3 5 5 15 6 5/6 6 6 18 9 2/3 7 7 21 3 7/3 8 8 24 6 4/3 9 9 27 9 1 10 1 30 3 1/3 11 2 33 6 1/3 12 3 36 9 1/3 13 4 39 3 4/3 14 5 42 6 5/6 15 6 45 9 2/3 16 7 48 3 7/3 17 8 51 6 4/3 18 9 54 9 1

What a ratio of 4/3 means that the digit sum of the dividend is multiplied by 4 and the result divided by 3, and the digit sum of that result taken to get the digit sum of the quotient.

There is a pattern to these ratios. The ratios are a function of the digit sum of the quotient k; the ratio not a function of the digit sum of the dividend. This is of no help in the computation of the digit sum of the quotient. What is known is that if the digit sum of the dividend is 3 then the digit sum of the quotient must be 1, 4 or 7. If the digit sum of the dividend is 6 then the digit sum of the quotient is 2, 5 or 8. And if the digit sum of the dividend is 9 then the digit sum of the quotient is 3, 6 or 9. (If the digit sum of dividend is not 3, 6 or 9 then the dividend is not a multiple of 3.)

## Digit Sums for Division by 6

For any dividend other than a multiple of 6 division by 6 will result in unending decimals such as 0.1666... or 0.3333... Since the digit sums for nonterminating decimals may be undefined, only multiples of 6 are considered, say 6k. The following table indicates the pattern of the relationship between the digit sum for k and 6k.

 k DS(k) 6k DS(6k) ratio 1 1 6 6 1/6 2 2 12 3 2/3 3 3 18 9 1/3 4 4 24 6 2/3 5 5 30 3 5/3 6 6 36 9 2/3 7 7 42 6 7/6 8 8 48 3 8/3 9 9 54 9 1 10 1 60 6 1/6 11 2 66 3 2/3 12 3 72 9 1/3 13 4 78 6 2/3 14 5 84 3 8/3 15 6 90 9 2/3 16 7 96 6 7/6 17 8 102 3 8/3 18 9 108 9 1

As in the case for division by 3, if the digit sum of the dividend is 3 then the digit sum of the quotient must be 1, 4 or 7. If the digit sum of the dividend is 6 then the digit sum of the quotient is 2, 5 or 8. And if the digit sum of the dividend is 9 then the digit sum of the quotient is 3, 6 or 9.

## Digit Sums for Division by 9

For the case in which the dividend is a multiple of 9 the digit sum of the dividend must be 9 and therefore the digit sum of the dividend gives no information about the digit sum of the quotient. It could be any digit.

## An Alternative Algorithm for the Case for 3, 6 and 9

Although the digit sum arithmetic for quotients cannot be applied directly for the case in which the digit sum of the divisor is a multiple of 3, an alternate version can be applied to get the digit sum of the quotient when it is defined. The procedure is to divide the numerator and denominator by the digit sum of the denominator and then apply digit sum arithmetic. For example, consider 96/12. The digit sum of denominator is 3 so division of the numerator and denominator by 3 gives 96/12=32/4. Applying digit sum arithmetic gives

#### DigitSum(32/4)=DigitSum(DigitSum(32*Equivalent(4))=DigitSum(5*7)=DigitSum(35)=8

which is the correct answer. In this case the arithmetic is trivial, but if the numerator was a 14-digit number and the denominator was a 5-digit number the algorithm would be worthwhile for a computational check.

For an example when the digit sum of the denominator is 6 consider 96/24. Division of the numerator and denominator by 6 gives 16/4=4. The digit sum arithmetic would give DigitSum(16)*Equivalent(4)=7*7=49, and DigitSum(49)=4, the correct answer.

For the case in which the digit sum of the denominator is 9 consider 180/18. The digit sum of the quotient is 1. Division of the numerator and denominator by 9 gives 180/18=20/2. Digit sum arithmetic would give DigitSum(20)*Equivalent(2)=2*5=10, which has the correct value of digit sum; i.e., 1.

Digit sum arithmetic generally cannot be applied if the division results in a non-terminating decimal. But for the case in which the quotient is a terminating decimal digit sum arithmetic does apply. For example, consider 99/12=8.25, whose digit sum is 6. Applying the algorithm would result in 99/12=33/4. The digit sum of this numerator is 6 and the equivalent of 4 is 7 so the algorithm gives 6*7=42, whose digit sum is the correct value of 6.

For another rationale for the nonexistence of Digit sum arithmetic for division by 3, 6 or 9 see Digit sum arithmetic for repeating decimals.

(To be continued.)