The question is - Find the first ten terms of the continued fraction representation for $e^ \pi $
Asked
Active
Viewed 73 times
2
-
3http://www.wolframalpha.com/input/?i=continued+fraction+for+e%5Epi – vadim123 May 26 '14 at 15:04
-
@vadim123 how does wolfram do it? Is there an algorithm? – Ant May 26 '14 at 15:09
1 Answers
1
Algorithm:
Set $r_0$ to be your desired real number, in this case $\displaystyle e^\pi$.
Now, for $i=0,1,2,3,\ldots$, do the following steps:
Set $c_i=\lfloor r_i\rfloor$. This is the floor function.
Set $r_{i+1}=\frac{1}{r_i-c_i}$.
Your desired continued fraction is now $[c_0;c_1,c_2,c_3,\ldots]$.
vadim123
- 82,796