Possible Duplicate:
Prove any rational can be expressed as $\sum\limits_{k=1}^n{\frac{1}{a_k}}$
Let $x$ be a number between $0$ and $1$. Let $a_1$ be the smallest positive integer such that $x_1=x-a_1^{-1}\geq 0$, let $a_2$ be the smallest positive integer such that $x_2=x_1-a_2^{-1}\geq 0$, etc. Show that this leads to a finite expansion
$x=\frac{1}{a_1}+\frac{1}{a_2}+\cdots+\frac{1}{a_n}$(that is, that $x_{n+1}=0$ for some $n$) if and only if x is rational.
Could anyone give a proof on this problem?