For every natural number $a \ge 2$, every natural number $m$ can be written in base $a$, i.e., as sum of powers of $a$: $$m=a^{b_1}\cdot k_1+\cdots+a^{b_n}\cdot k_n$$ with $b_1>\cdots>b_n$ and $0<k_i<a$ for all $i=\overline{1,n}$.
Does my attempt look fine or contain logical flaws/gaps? Any suggestion is greatly appreciated. Thank you for your help!
My attempt:
We prove by induction on $m$.
For $m=1$, $m$ can be expressed as $a^0\cdot 1$ for all natural number $a\ge 2$.
Assume that, for all $k<m$, $k$ can be written in base $a$ for all natural number $a\ge 2$.
Let $b_1=\max\{b\in \mathbb{N}\mid a^b\le m\}$. Then there is $k_1$ and $r<a^{b_1}$ such that $m=a^{b_1}\cdot k_1+r$. Since $r<a^{b_1}$, $r<m$ and thus $k_1>0$. I claim that $k_1<a$. If not, $k_1\ge a$ and thus $k_1=a+\Delta$ for some $\Delta\ge 0$. Then $m=a^{b_1}\cdot k_1+r=a^{b_1}\cdot (a+\Delta)+r=a^{b_1+1}+a^{b_1}\cdot\Delta+r$. This contradicts the maximality of $b_1$. Thus $k_1<a$. Since $r<m$, $r=a^{b_2}\cdot k_2+\cdots+a^{b_n}\cdot k_n$ by inductive hypothesis. Since $r<a^{b_1}$, $a^{b_2}\cdot k_2+\cdots+a^{b_n}\cdot k_n<a^{b_1}$ and thus $a^{b_2}\cdot k_2<a^{b_1}$. It follows that $b_2<b_1$. Hence $m=a^{b_1}\cdot k_1+\cdots+a^{b_n}\cdot k_n$ as desired.