5
$\begingroup$

Take a number say 987654. Sum it's digits

9 + 8 + 7 + 6 + 5 + 4 = 39 3 + 9 = 12 1 + 2 = 3 

i.e. keep doing this till you get a single digit answer.

Now I take the same number & do it in other different ways, I still end up with the same answer.

987 + 654 = 1641 16 + 4 + 1 = 21 2 + 1 = 3 

Or

98765 + 4 = 98769 9876 + 9 = 9885 988 + 5 = 993 99 + 3 = 102 1 + 0 + 2 = 3 

How come I always get the same answer (3 in this case). This is not special for 987654. It's for any number you take.

What's the reason or theory behind this?

(PS - I am not sure what's the right tag for this question. Please correct if necessary).

  • 0
    Note that this does not for all numbers. For example: 1 or 71 don't yield 3 as in your examples.2012-10-24
  • 0
    I didn't say that the answer is always 3.2012-10-24
  • 0
    You said: "This is not special for 987654. It's for any number you take." - Anyway, nevermind, I just wanted to make it clear for you.2012-10-24
  • 0
    Yes, but I didn't say the answer is always 3. I said the answer is the same irrespective of what manner you add a particular number up - check the 3 different ways of adding up in the 3 examples in my question.2012-10-24
  • 0
    OK, I see your point.2012-10-24

2 Answers 2

2

What you have stumbled upon is known as taking the digital root, which is also sometimes referred to as a part of "Vedic mathematics." You might also be interested in reading about "Casting out nines". These sources should help point you in the right direction.

2

In short: in the end of this 'sum of digits' procedure, what is left coincides with the remainder modulo $9$. (More precisely, if $9|n$ then $9$ will be the result, unless $n=0$.)

The main point is $10\equiv 1 \pmod{9}$, hence $10^k\equiv 1 \pmod{9}$ for all $k\in\Bbb N$. So for any number with decimal digits $N=\overline{a_1a_2...a_n}$ $$N=\sum_{k=1}^n 10^{n-k}\cdot a_k \equiv \sum_k a_k \pmod{9} $$ So, meanwhile the process, the remainder mod $9$ always stays the same.

  • 3
    This is certainly true, but perhaps the OP was more interested in knowing something about the reason behind it. If you would explain why the sum of digits coincides with the remainder modulo 9 I would upvote your answer.2012-10-24
  • 1
    I understand that the final answer answer for sumofdigits is always sumofdigits modulo 9. That's not my question. My question is why I get the same answer even if I go about summing different subsets of digits and then again summing them together - not sure how to describe this best - but my examples are there in my question2012-10-24
  • 1
    @user93353 The answer to that question is simple. Both the sum of digits and remainder modulo 9 is unchanged if we write $987654$ as $987000 + 654$. Then we note again that both remain unchanged as we strip away the three $0$-s. Also, carrying out the actual resulting addition $987 + 654 = 1641$ does not change remainder modulo 9, and thus does not change the final sum of digits.2012-10-24
  • 0
    @Arthur Upto stripping away the three 0-s is fine. But why does carrying out the addition `987 + 654 = 1641` not change the remainder modulo 9?2012-10-24
  • 1
    Because that's part of how modulo arithmetic works. In this case, if we take remainders on each side, we get $6 + 6 \mod 9$ on one side, and $3 \mod 9$ on the other side. Calculating, we get $6 +6 \equiv 12 \equiv 3 \mod 9$ for the left hand side, which is congurent to the $3$ on the right hand side.2012-10-24
  • 0
    Technically we can say that reducing modulo 9 is a ring homomorphism - it respects the basic operations of multiplication and addition. It doesn't matter whether you do your arithmetic before you do the reduction, or afterwards, or part before and part after, you get the same eventual result (mod 9). This works so well for decimal numbers mod 9, because $10 \equiv 1 \mod 9$, so that the integer 10 acts like 1 when reduced mod 9, ie as the identity element for multiplication. (if our number base were 12 we'd be working mod 11 ...)2012-10-24