1

First I prove that $10^nx\mod9=x\mod9$.

Base case: $10^0x \mod 9=x \mod 9$

Assume $10^kx \mod 9=x \mod 9$.

$10^{k+1}x \mod 9=10*10^kx \mod 9=(10 \mod 9 * (10^kx) \mod 9)\mod 9$

$=((10^kx) \mod 9)\mod 9=((10^kx) \mod 9)=x\mod 9$ by assumption.

Let $n \in Z$. Then $n=10^nd_n+....+10d_1+d_0$ with $di \in Z$ and $0<d_i<10$.

$(10^nd_n+....+10d_1+d_0) \mod 9=$

$((10^nd_n) \mod 9+....+(10d_1) \mod 9+d_0 \mod 9) \mod 9=$

$((10^n \mod 9 *d_n \mod 9) \mod 9+....+(10 \mod 9* d_1 \mod 9 ) \mod 9+d_0 \mod 9) \mod 9=$

$(d_n \mod 9) \mod 9+....+(d_1 \mod 9 ) \mod 9+d_0 \mod 9) \mod 9=$

$(d_n \mod 9+....+d_1 \mod 9+d_0 \mod 9) \mod 9=$

$(d_n+...+d_1+d0) \mod 9$

Therefore, $(d_n+...+d_1+d0) \mod 9=0$ IFF $n \mod 9=0$.

Is this proof correct? Any simpler way to do it?

B_math
  • 21
  • 1
    Your proof is correct. You can also simply say $10^n = 1^n mod(9)$ to simplify your solution. – Snowball May 25 '21 at 04:58
  • For a shortcut without induction $10^nx-x=(10^n-1)x=(10-1)(10^{n-1}+10^{n-2}+\dots+1)x$ so $10^nx - x$ is a multiple of $9$. For another hint: take a number, for example $357 = 3 \cdot 10^2 + 5 \cdot 10 + 7$, then $357 - (3+5+7) = 3 \cdot (10^2-1) + 5 \cdot (10-1) = (10 - 1),\left(3 \cdot (10 + 1) + 5\right)$. – dxiv May 25 '21 at 05:42
  • See the answers in the linked dupe for simpler ways. – Bill Dubuque May 25 '21 at 09:15

0 Answers0