﻿ Quotients and Remainders in Digit Sum Arithmetic
San José State University

applet-magic.com
Thayer Watkins
Silicon Valley
USA

Quotients and Remainders
in Digit Sum Arithmetic

The previous work on digit sum arithmetic primarily was conerned with remainders. This extends the analysis to quotients. The analysis will start for simplicity with decimal numbers and division by 9.

A decimal number cncn-1…c1c0 represents the polynomial in powers of 10 of

#### N = cn10n+cn-110n-1+…+c110+c0

Let D(N) be the sum of the digits of the decimal representation of N; i.e, D(N) = cn+cn-1+…+c1+c0

Then

#### N − D(N) = cn(10n−1)+cn-1(10n-1−1)+…+c1(10−1) which is N − D(N) = cn(99…99)+cn-1(9…99)+…+c1(9) or, equivalently N − D(N) = 9[cn(11…11)+cn-1(1…11)+…+c1(1)]

This means that the quotient Q of (N − D(N)) divided by 9 is

#### Q = cn(11…11)+cn-1(1…11)+…+c1

The representation of Q as a polynomial in powers of 10 is

where

#### dn-1 = cn dn-2 = cn + cn-1 dn-3 = cn + cn-1 + cn-2 … … d1 = cn + cn-1 + … + c2 d0 = cn + cn-1 + … + c2 + c1

In other words, the quotient has digits equal to the cumulative sums from the left of the digits of N up to, but not including, the unit digit on the right.

For illustration take N=123. The sum of the digits D(123) is 6. N−D(N) for this case is 123−6=117. The cumulative sums of the first two digits of the three digit number 123, are 1 and 3. Thus the quotient of 117 divided by 9 is 1*10+3=13. Indeed 117/9 is equal to 13. Thus 123=13*9+6.

It is not alway quite so simple. Take N=498, D(498)=21. Then 498−21 is equal to 477. The cumulative sums from the left for the first two digits of 498 is 4 and 13. The quotient of 477 divided by 9 should be 4*10+13 which is equal to 53. I n fact, 477/9=53. Thus if a cumulative sum is two digits the extra digit must be carried over to the digit for the next higher place.

For a last case take N=2001, Then D(N)=3 and N−D(N)=1998. The cumulative sums of the first three digits of the four digit number 2001 are 2, 2 and 2 so the quotient for the division of 1998 by 9 should be 222. In fact 1998/9 does equal 222.

## Digit Net Sums and Remainders Modulo 11

Similar properties prevail for 11=10+1 as do for9=10−1 but involve more complex operation. For the polynomial in powers of 10 of

#### N = cn10n+cn-110n-1+…+c110+c0

the relevant quantity is

#### c0 − c1 + c2 −… ±cn

which will be called the digit net sum of N and denoted as DNS(N).

For any number N, N−DNS(N) is exactly divisible by 11. For example. if N=125 then DNS(N)=5−2+1=4. Then N−DNS(N)=121, which is 11*11. If N=181 then DNS(N) = 1−8+1=−6. Then N−DNS(N) is equal to 181−(−6)=181+6=187. This value divided by 11 is exactly 17. Thus 181=17*11−6 which is equivalent to 16*11+(11−6)=16*11+5. Thus the remainder for division of 181 by 11 is 5, but −6 is equivalent to 5 modulo 11.

N−DNS(N) is equal to

#### cn(10n−(−1)n) … + c49999 + c31001 + c299 + c111

Division by 11 gives

#### cn(10n−(−1)n)/11 … + c4909 + c391 + c29 + c11

There is an iterative relationship between the digits in the quotient Q=(N−DNS(N))/11 and the digits of N but it is too complex at this point to specify.

For three-digit numbers the relationship is manageable. Q=c19 + c0. For example, if N=254 then DNS(N)=1 and N−DNS(n)=253. Q=2*9+5=18+5=23. The quotient of 253 divided by 11 is 23. Another way this can be represented is as

#### d1 = c2 d0 = −c2 + c1

So Q=2*10 + (−2 + 5) = 20 + 3.

Consider N=188 and hence DNS(N)=1 so N−DNS(N)=187. Thus Q=17, but also Q=1*10+(−1+8)=1*10+7=17. Now consider N=275 so DNS(N)=0 and thus N−DNS(N)=275 and Q=25. However Q should also be equal to 2*10+(−2+7)=2*10+5=25.

For another example that works out similarly consider N=382 so DND=−3 and N−DNS(N) is equal to 385 and Q=35. But 3*10 + (−3 + 8) = 3*10 + 5 = 35.

For four digit numbers the relationship between the digits of the quotient and the digits of the number being considered is

#### d2 = c3 d1 = −c3 + c2 d0 = c3 −c2 + c1

Thus the digits of the quotient are related to the cumulative alternating sums of the digits of the number. For example let N=3842 so DNS(N)=3 and hence N−DNS(N)=3839 which has the quotient of 349 upon division by 11. The cumulative alternating sums of 384 are 3, −5, −1. Changing alternate signs makes the cumulative net sums 3, 5, −1. This give Q as 3*100+5*10−1, which is equal to 349.

Now consider N=5242 so DNS(N)=−5 and N−DNS(N)=5247 and Q=477. The cumulative alternating sums of 524 are 5, 3, 7. Changing alternate signs gives the cumulative alternating net sums as 5, −3, 7. Thus Q should be equal to 5*100−3*10+7 and this is in fact 477.

The general rule is then that if n is the largest power of 10 in N then the digits of the quotient Q of the division of [N−DNS(N)]/11 are given by

#### dn-1 = cn dn-2 = (−1)[cn−cn-1] … … d0 = (−1)n-1[cn−cn-1+…±c1]

with the provison that if any of these digits is negative the digit is turned into a positive digit by adding it to a 10 borrowed from the next higher power of 10. If any digit came out to be 10 then it is to be eliminated by adding 1 to the next higher power of 10.

For an example consider N=31415926 and thus DNS(N)=3 and N−DNS(N)=31415923. The quotient Q for the division of this number by 11 is 2855993. The cumulative alternating sums for 3141592 are 3, 2, 6, 5, 10, 1, 3. Changing alternate signs gives the sequence 3, −2, 6, −5, 10, −1, 3. This gives

#### Q = 3×106 − 2 ×105 + 6×104 −5×103 +10×102 − 1×101 + 3 which reduces to Q = 2×106 + 8×105 + 5×104 + 5×103 +9×102 + 9×101 + 3 or, equivalently Q = 2855993

Thus there is a method for obtaining the relevant quotient based upon the cumulative net sums of the digits of a number.

(To be continued.)