0
$\begingroup$

How would one go about proving this rule using modular arithmetic and can it be done using Euclidean algorithm?

The question is this but I am unsure which route to take: The number $123$ in $\mathbb{Z}$ has the property that $123 = 6 \mod{9}$, and $1 + 2 + 3 = 6 \mod {9}$. Prove that an integer is divisible by $9$ if and only if the sum of its digits is divisible by $9$.

Any help would be appreciated as my lecturer won't post any solutions.

  • 1
    Try googling "divisibility by 9". There are many articles that explain it.2017-02-12
  • 0
    I have however none seem related to anything we have covered in class2017-02-12
  • 0
    Then why don't you tell us what you've covered in class so we can give you answers that relate to it.2017-02-12
  • 0
    this is why I asked about Euclidean algorithm. So far we have done group axioms, modular arithmetic and euclidean2017-02-12

3 Answers 3

4

Suppose, the digits $a_n,a_{n-1},\cdots ,a_1,a_0$ form the number $N$. Then, we have $$N=10^na_n+10^{n-1}a_{n-1}+\cdots+10a_1+a_0$$

Because of $$10^k\equiv 1\mod 9$$ for all non-negative integers $k$, we get

$$N\equiv a_n+a_{n-1}+\cdots+a_1+a_0\mod 9$$

So, the number has the same residue modulo $9$ as the sum of its digits.

0

HINT: Observe that any integer $n$ can be expressed as $n=a_0+10a_1+100a_2+\ldots+10^ra_r=\sum_{i=0}^r10^ra_r$

So $$n=\sum_{i=0}^r10^ra_r$$ $$=\sum_{i=0}^r(10^r-1)a_r + \sum_{i=0}^ra_r$$

Now, observe that $10^r-1$ is divisible by $9$ for all $r$.

I think you can do the rest.

0

Consider that $ABC = 123$, and $ABC$ does not mean $A*B*C$, rather you substitute the values to create a number. $A=1$, $B=2$, $C=3$.

We start off by saying: $123=123$

We can rewrite: $1*100+2*10+3*1=123$

Furthermore: $1*(99+1)+2*(9+1)+3*(0+1)=123$

Factor: $9*(1*11+2*1+3*0)+(1+2+3)=123$

Then if we look, we have $(1+2+3)$ on the left=hand side, which is the sum of the digits in the number $123$. We can subtract it from both sides. $9*(1*11+2*1+3*0)=123-(1+2+3)$.

Logically, if you subtract a multiple of $9$ from a multiple of $9$, the result will be a multiple of $9$. If we look at out equation, we see that the left-hand side has a $9$ factored out, meaning that it is divisible by $9$.

Using the logic stated above, we know that if $123$ is divisible by $9$, then the sum of the digits, $(1+2+3)$ MUST be divisible by $9$, because otherwise the equation would not be true.