I am trying to prove one of the early questions in Serge Lang's Undergraduate Algebra textbook (Question 1 on Section 1.5) and I am not sure if I have proven it correctly.
- Let $n, d \in \mathbb{N}$ and assume $1 < d < n$. Show that $n$ can be written in the form \begin{equation*} n = c_0 + c_1 d + \cdots + c_kd^k \end{equation*} with integers $c_i$ such that $0 \leq c_i < d$ and that these integers are uniquely determined. [Hint: For the existence, write $n = qd + c_0$ by the Euclidean algorithm, and then use induction. For the uniqueness, use induction, assuming $c_0, c_1,..., c_r$ are uniquely determined; show that $c_{r + 1}$ is then uniquely determined.]
Here is my attempt:
Proof: We first prove the existence of such representation. We can first apply the Euclidean algorithm as by the hint of the form \begin{equation*} n = qd + c_0 \end{equation*} To use induction, assume the base case when $k = 0$. Then we have $q = 0$ so that $n = c_0$. For $k = 1$, we have $q = c_1$ so that $n = c_0 + c_1d$. For $k = 2$, we have $q = c_1 + c_2d$ so that $n = (c_1 + c_2d)d + c_0 = c_0 + c_1d + c_2d^2$. Now let us assume that for $k \in \mathbb{N} \cup \{0\}$, that \begin{equation*} q = c_1 + c_2d + \cdots + c_kd^{k - 1} \end{equation*} is such that \begin{equation*} n = c_0 + c_1d + c_2d^2 + \cdots + c_kd^k \end{equation*} Then for $k + 1$, we have that \begin{equation*} q = c_1 + c_2d + \cdots + c_{k + 1}d^k \end{equation*} so that \begin{equation*} n = qd + c_0 = (c_1 + c_2d + \cdots + c_{k + 1}d^k)d + c_0 = c_0 + c_1d + c_2d^2 + \cdots + c_{k + 1}d^{k + 1} \end{equation*} as required.
My question: (1) Am I showing the steps correctly for the representation for $n$, and (2) I am not sure how to show that each of the integer coefficients are uniquely determined, but I am thinking that for each $i$, each of the coefficients can be such that $c_i = c_i'$.
Any help is appreciated!