# Continued Fraction Expansion of Euler's Number/Proof 1/Lemma

## Theorem

For $n \in \Z , n \ge 0$:
 $\displaystyle A_n$ $=$ $\displaystyle q_{3 n} e - p_{3 n}$ $\displaystyle B_n$ $=$ $\displaystyle p_{3 n + 1} - q_{3 n + 1} e$ $\displaystyle C_n$ $=$ $\displaystyle p_{3 n + 2} - q_{3 n + 2} e$

## Proof

To prove the assertion, we begin by demonstrating the relationships hold for the initial conditions at $n = 0$:

 $\displaystyle A_0$ $=$ $\displaystyle \int_0^1 e^x \rd x$ $\displaystyle$ $=$ $\displaystyle \bigintlimits {e^x} {x \mathop = 0} {x \mathop = 1}$ Primitive of Exponential Function $\displaystyle$ $=$ $\displaystyle e - 1$ $\displaystyle$ $=$ $\displaystyle q_0 e - p_0$ $\displaystyle B_0$ $=$ $\displaystyle \int_0^1 x e^x \rd x$ $\displaystyle$ $=$ $\displaystyle \bigintlimits {x e^x - e^x} {x \mathop = 0} {x \mathop = 1}$ Primitive of x by Exponential of a x $\displaystyle$ $=$ $\displaystyle 1$ $\displaystyle$ $=$ $\displaystyle p_1 - q_1 e$ $\displaystyle C_0$ $=$ $\displaystyle \int_0^1 \paren {x - 1} e^x \rd x$ $\displaystyle$ $=$ $\displaystyle \int_0^1 x e^x \rd x - \int_0^1 e^x \rd x$ $\displaystyle$ $=$ $\displaystyle B_0 - A_0$ $\displaystyle$ $=$ $\displaystyle 1 - \paren {e - 1}$ $\displaystyle$ $=$ $\displaystyle 2 - e$ $\displaystyle$ $=$ $\displaystyle p_2 - q_2 e$

The final step needed to validate the assertion, we must demonstrate that the following three recurrence relations hold:

 $\text {(1)}: \quad$ $\displaystyle A_n$ $=$ $\displaystyle -B_{n - 1} - C_{n - 1}$ $\text {(2)}: \quad$ $\displaystyle B_n$ $=$ $\displaystyle -2 n A_n + C_{n - 1}$ $\text {(3)}: \quad$ $\displaystyle C_n$ $=$ $\displaystyle B_n - A_n$

To prove the first relation, we note that the derivative of the integrand of $A_n$ is equal to the sum of the integrand of $A_n$ with the integrand of $B_{n - 1}$ and the integrand of $C_{n - 1}$.

By integrating both sides of the equation, we verify the first recurrence relation:

 $\displaystyle \map {\frac \d {\d x} } {\frac {x^n \paren {x - 1}^n } {n!} e^x}$ $=$ $\displaystyle \frac {x^n \paren {x - 1 }^n} {n!} e^x + \frac {x^n \paren {x - 1}^{n - 1} } {\paren {n - 1}!} e^x + \frac {x^{n - 1} \paren {x - 1}^n} {\paren {n - 1}!} e^x$ $\displaystyle \leadsto \ \$ $\displaystyle \int_0^1 \map {\frac \d {\d x} } {\frac {x^n \paren {x - 1}^n} {n!} e^x}$ $=$ $\displaystyle \int_0^1 \frac {x^n \paren {x - 1}^n} {n!} e^x \rd x + \int_0^1 \frac {x^n \paren {x - 1}^{n - 1} } {\paren {n - 1}!} e^x \rd x + \int_0^1 \frac {x^{n - 1} \paren {x - 1}^n} {\paren {n - 1}!} e^x \rd x$ Integrating both sides of the equation over the interval from $0$ to $1$ $\displaystyle \leadsto \ \$ $\displaystyle \intlimits {\frac {x^n \paren {x - 1}^n} {n!} e^x} {x \mathop = 0} {x \mathop = 1}$ $=$ $\displaystyle A_n + B_{n - 1} + C_{n - 1}$ Fundamental Theorem of Calculus $\displaystyle \leadsto \ \$ $\displaystyle 0$ $=$ $\displaystyle A_n + B_{n - 1} + C_{n - 1}$ $\displaystyle \leadsto \ \$ $\displaystyle A_n$ $=$ $\displaystyle -B_{n - 1} - C_{n - 1}$ rearranging

To prove the second relation, we note that the derivative of the integrand of $C_n$ is equal to the sum of the integrand of $B_n$ with two times n times the integrand of $A_{n}$ minus the integrand of $C_{n - 1}$.

By integrating both sides of the equation, we verify the second recurrence relation:

 $\displaystyle \map {\frac \d {\d x} } {\frac {x^n \paren {x - 1}^{n + 1} } {n!} e^x}$ $=$ $\displaystyle \frac {x^{n + 1} \paren {x - 1}^n} {n!} e^x + 2 n \frac {x^n \paren {x - 1}^n} {n!} e^x - \frac {x^{n - 1} \paren {x - 1}^n} {\paren {n - 1}!} e^x$ $\displaystyle \leadsto \ \$ $\displaystyle \int_0^1 \map {\frac \d {\d x} } {\frac {x^n \paren {x - 1}^{n + 1} } {n!} e^x}$ $=$ $\displaystyle \int_0^1 \frac {x^{n + 1} \paren {x - 1}^n} {n!} e^x \rd x + 2 n \int_0^1 \frac {x^n \paren {x - 1}^n} {n!} e^x \rd x - \int_0^1 \frac {x^{n - 1} \paren {x - 1}^n} {\paren {n - 1}!} e^x \rd x$ Integrating both sides of the equation over the interval from $0$ to $1$ $\displaystyle \leadsto \ \$ $\displaystyle \intlimits {\frac {x^n \paren {x - 1}^{n + 1} } {n!} e^x} {x \mathop = 0} {x \mathop = 1}$ $=$ $\displaystyle B_n + 2 n A_{n} - C_{n - 1}$ Fundamental Theorem of Calculus $\displaystyle \leadsto \ \$ $\displaystyle 0$ $=$ $\displaystyle B_n + 2 n A_n - C_{n - 1}$ $\displaystyle \leadsto \ \$ $\displaystyle B_n$ $=$ $\displaystyle -2 n A_n + C_{n - 1}$ rearranging

To prove the third relation, we have:

 $\displaystyle C_n$ $=$ $\displaystyle \int_0^1 \frac {x^n \paren {x - 1}^{n + 1} } {n!} e^x \rd x$ $\displaystyle$ $=$ $\displaystyle \int_0^1 \frac {x^n \paren {x - 1 }^n} {n!} e^x \paren {x - 1} \rd x$ factoring out $\paren {x - 1}$ $\displaystyle$ $=$ $\displaystyle \int_0^1 \frac {x^n \paren {x - 1}^n} {n!} e^x \paren x \rd x - \int_0^1 \frac {x^n \paren {x - 1}^n} {n!} e^x \paren 1 \rd x$ separate integrals $\displaystyle$ $=$ $\displaystyle \int_0^1 \frac {x^{n + 1} \paren {x - 1}^n} {n!} e^x \rd x - \int_0^1 \frac {x^n \paren {x - 1}^n} {n!} e^x \rd x$ $\displaystyle$ $=$ $\displaystyle B_n - A_n$

From the first relation, combined with the initial condition at $n = 0$ being satisfied, we have:

 $\displaystyle A_n$ $=$ $\displaystyle -B_{n - 1} - C_{n - 1}$ $\displaystyle$ $=$ $\displaystyle -\paren {p_{3 n - 2} - q_{3 n -2 } e} - \paren {p_{3 n - 1} - q_{3 n - 1} e}$ $\displaystyle$ $=$ $\displaystyle q_{3 n} e - p_{3 n}$

From the second relation, combined with the initial condition at $n = 0$ being satisfied, we have:

 $\displaystyle B_n$ $=$ $\displaystyle -2 n A_n + C_{n - 1}$ $\displaystyle$ $=$ $\displaystyle -2 n \paren {q_{3 n} e - p_{3 n} } + \paren {p_{3 n - 1} - q_{3 n - 1} e}$ $\displaystyle$ $=$ $\displaystyle p_{3 n + 1} - q_{3 n + 1} e$

From the third relation, combined with the initial condition at $n = 0$ being satisfied, we have:

 $\displaystyle C_n$ $=$ $\displaystyle B_n - A_n$ $\displaystyle$ $=$ $\displaystyle \paren {p_{3 n + 1} - q_{3 n + 1} e} - \paren {q_{3 n} e - p_{3 n} }$ $\displaystyle$ $=$ $\displaystyle p_{3 n + 2} - q_{3 n + 2 } e$

$\blacksquare$