Question 21
Given a positive integer $n$, a sequence of integers $a_{1}, a_{2}, \ldots, a_{r}$, where $0 \leq a_{i} \leq k$ for all $1 \leq i \leq r$, is said to be a "$k$-representation" of $n$ if there exists an integer $c$ such that
$$
\sum_{i=1}^{r} a_{i} = \sum_{i=1}^{r} a_{i} k^{c-i} = n.
$$
Prove that every positive integer $n$ has a $k$-representation, and that the $k$-representation is unique if and only if 0 does not appear in the base-$k$ representation of $n-1$.
$$
\sum_{i=1}^{r} a_{i} = \sum_{i=1}^{r} a_{i} k^{c-i} = n.
$$
Prove that every positive integer $n$ has a $k$-representation, and that the $k$-representation is unique if and only if 0 does not appear in the base-$k$ representation of $n-1$.