I need to find the 2nd term of continued fraction for the power tower ${^5}e=e^{e^{e^{e^{e}}}}$ ( i.e. $\lfloor\{e^{e^{e^{e^{e}}}}\}^{-1}\rfloor$), or even higher towers. The number is too big to process in reasonable time with numerical libraries or algorithms known to me — the 1st term of the continued fraction has more than $10^{10^6}$ decimal digits. Is there a trick that allows to do such calculations faster?

UPDATE: I created a sequence A225053 in OEIS for 2nd terms of continued fractions for power towers $e,\,e^e,\,e^{e^e},\,\dots$ Please feel free to extend it if you find a way to calculate further terms.

Vladimir Reshetnikov
  • 45,303
  • 7
  • 151
  • 282
  • Have you looked at Euler's continued fraction formula for the exponential function? http://en.wikipedia.org/wiki/Euler%27s_continued_fraction_formula#The_exponential_function It probably won't help you get an exact answer, but it may show you that it's not 0. – Brian Rushton Apr 29 '13 at 22:04

1 Answers1


It might be not a direct answer to your question, but it is possible that there is no 2nd term of the continued fraction in question.

I believe it is a long-standing open problem if $\,{^5 e}\in\mathbb{N}$, and, in general, for every integer $n \ge 5$, if $\,{^n e}\in\mathbb{N}$ (and also, for every integer $n \ge 4$, if $\,{^n \pi}\in\mathbb{N}$).

It is mentioned multiple times in Wikipedia, e.g. in Russian Wikipedia article Открытые математические проблемы (Open mathematical problems) and on some mailing lists. Similar questions were discussed here on Math.SE: $e^{e^{e^{79}}}$ and ultrafinitism, How to show $e^{e^{e^{79}}}$ is not an integer. Currently these questions look very far from being resolved and it is completely unclear how to approach them.

Oksana Gimmel
  • 5,222
  • 2
  • 31
  • 36