I'm doing Exercise 7 in textbook Algebra by Saunders MacLane and Garrett Birkhoff.
Prove that any rational number $r / s \neq 0$ can be expressed uniquely in the form $r / s=b_{1}+b_{2} / 2 !+b_{3} / 3 !+\cdots+b_{n} / n !$, where $n$ is a suitable integer, and each $b_{k}$ is an integer, with $0 \leqslant b_{k}<k$ if $k>1$, and $b_{n} \neq 0$.
It takes me time to come up with my proof. Could you please verify if my understanding is correct? Thank you so much for your help!
My attempt:
It suffices to consider the case $0<r<s$. First, we prove the existence of such representation by defining a sequence $(a_n)_{n \ge 1}$ with $a_1 = 0$ and $$a_{n+1} = \max \left \{0 \le k\le n \,\middle\vert\, \frac{k}{(n+1)!} \le \frac{r}{s} - \sum_{i=1}^{n} \frac{a_i}{i!} \right\}$$
Second, we show that this sequence will be $0$ after $s!$ terms. We have
$$s! \left (\frac{r}{s} - \sum_{i=1}^{s} \frac{a_i}{i!} \right ) = r(s-1)! - \sum_{i=1}^{s} \frac{s!a_i}{i!} \in \mathbb N$$
By construction,
$$s! \left (\frac{r}{s} - \sum_{i=1}^{s} \frac{a_i}{i!} \right ) < \frac{s!(a_{s+1}+1)}{(s+1)!} = \frac{a_{s+1}+1}{s+1} \le 1$$
It follows that $r/s - \sum_{i=1}^{s} {a_i}/{i!} = 0$. Finally, we show that such representation is unique. Assume $\sum_{i=1}^{s} {a_i}/{i!}$ and $\sum_{i=1}^{t} {b_i}/{i!}$ are such $2$ representations of $r/s$. Let $m$ be the least $n$ such that $a_n \neq b_n$. WLOG, we assume $a_m < b_m$ and get $b_m - a_m \ge 1/m!$. On the other hand,
$$\sum_{i=m+1}^s \frac{a_i}{i!} < \sum_{i=m+1}^\infty \frac{i-1}{i!} =\frac{1}{m!}$$
As such, $\sum_{i=1}^{s} {a_i}/{i!} < \sum_{i=1}^{t} {b_i}/{i!}$, which is a contradiction. Hence $a_i = b_i$ for all $i$.
Near the end, where you wrote $b_m-a_m\ge 1/m!$, I expect that you meant to write $\sum_{i=1}^s\frac{b_i}{i!}-\sum_{i=1}^s\frac{a_i}{i!}\ge\frac1{m!}$ or perhaps $\frac{b_m}{m!}-\frac{a_m}{m!}\ge\frac1{m!}$, but apart from that it’s excellent.