0

I know this is a silly question, but it amazes me and I don't know the explanation.

I was driving and jammed in the traffic, and I like to sum in my head the digits on the plate (I'm in Italy, plates contains 3 digits). I noticed this strange behaviour: sum all the digits, you will get a 2 digits number, sum those digits and get another number, this time of 1 digit, call it $n_1$.

Now take the first 2 digits, sum them and sum the digits of the new number, now sum the third number and sum again the digits, and you will get another number $n_2$. What amazes me is that $n_1$ and $n_2$ are equal! And the same happen proceeding in any arbitrary order.

Since english is not my native language, I will write an example:

First, define a function $D(n)$, which takes an integer number and gives the sum of its digits until we get a 1 digit result(for example $D(78)=(7+8=15)=6$).

Consider a 3 digits number, say $678$. Then $D(678)=3=n_1$.

Now sum the first two digits, we get $13$, sum these digit and sum the third digit $1+3+8=21$ and $n_2=D(21)=3$.

What we did can be written as $n_2=D(D(a_1+a_2)+a_3)$.

Similarly any order in which we sum the digits gives the same final result $$D(D(a_1+a_2)+a_3)=D(D(a_1+a_3)+a_2)=D(D(a_2+a_3)+a_1)=D(a_1+a_2+a_3)$$ My question is: why this happen? It feels extremely rare since we are summing digits of different numbers and yet obtain the same result.


As final note, I hope I made myself clear enough, I'm open to suggestion on how to make this more easy to understand. Feel free also to correct me on tags choice. Good evening from Italy!

john
  • 1
  • 1
    Note that $D(n)$ is (essentially) just $n\pmod 9$. The only difference is that if $n\equiv 0\pmod 9$ then $D(n)=9$, not $0$. That observation should make it easy for you to prove your claim. – lulu Nov 11 '21 at 20:06
  • Unfortunately I'm not a mathematician, so I know what $mod$ is, but not how to work with it. Also I don't know what topic of math this is, so that's why I only put 1 tag – john Nov 11 '21 at 20:41
  • Ok, so phrase it this way, $D(n)$ is the remainder you get when you divide $n$ by $9$, with the exception that, if $9$ divides $n$ perfectly, then $D(n)=9$, not $0$. For example, take $n=123456$. Then we see that $n=13717\times 9 +3$ and indeed you may check that $D(123456)=3$. – lulu Nov 11 '21 at 20:44

0 Answers0