Base 10 theorem in number theory The question asks:
Let $n\ \in \mathbb{N}$ in base $10$ as $n=a_ka_{k-1}\cdots a_1a_0$. Let $m=a_k+a_{k-1}+\cdots + a_1+a_0$. Then $9\mid n$ if and only if $9\mid m$
Here is my Proof:
$9\mid n$ implies that $n=9k$ where $k\in \mathbb{Z}$
Next, we can express $n$ as such:
$$n=a_0+10a_1+100a_2+\cdots\\
n=a_0+(9+1)a_1+(99+1)a_2+\cdots\\
n=a_0+9a_1+a_1+99a_2+a_2+\cdots\\
n=(\underbrace{a_0+a_1+a_2+\cdots}_\text{m}) + 9(\underbrace{a_1+11a_2+\cdots}_\text{k})$$
Thus, $n=m+9k$ which implies that $9\mid(n-m)$ which can be written as the congruence, $n\equiv m\pmod 9$.
Now, from here, what steps do I need to take to prove the theorem?
We have $k\in\Bbb Z$. Therefore:
If $9|n$ then $n/9\in\Bbb Z$ so $m/9=(n/9)-k\in\Bbb Z,$ so $9|m.$
If $9\not |\,n$ then $n/9\not\in\Bbb Z$ so   $m/9=(n/9)-k\not\in\Bbb Z,$ so $9\not |\,m.$
The trick is that all of the powers of $10$ are $1\bmod9$.