Deriving $\sqrt2 \approx 1 + \frac13 + \frac1{3 \cdot 4} - \frac1{3 \cdot 4 \cdot34}$ Here is a wierd expansion for $\sqrt2$ found in the ancient Indian mathematical literature.
$$1 + \frac13 + \frac1{3 \cdot 4} - \frac1{3 \cdot 4 \cdot34} = \frac {577}{408}$$
Today we know that the resulting fraction can be obtained using Pell numbers i.e. the recursion $\frac{P_{n-1}}{P_n} - 1$ .
Can someone explain how can we come up with that particular expansion?

EDIT: This is an answer for an algorithm to generate the unit fractions of the expansion :
$$\sqrt2 \approx 1 + \frac12 - \frac1{3 \cdot 4} - \frac1{3 \cdot 4 \cdot34}$$
(an answer to the actual question is provided by Gerry Myerson in his first comment)
$$-$$
This (signed) Egyptian fraction may be obtained by starting with the 'exact' $\sqrt{2}$ and removing at each iteration the multiplicative inverse of the nearest integer of the remainder :
\begin{array} {c|cc}
x&1/x&[1/x]\\
\sqrt{2}&0.707106781187&1\\
\sqrt{2}-1&2.41421356237&2\\
\sqrt{2}-1-\frac 12&-11.6568542495&-12\\
\sqrt{2}-1-\frac 12+\frac 1{12}&-407.646752982&-408\\
\end{array}
This method may be generalized at wish...
