Is $e^{e^9}$ an integer?

522 Views Asked by At

I mean, of course $e^{e^9}$ is not an integer, but can we prove this? If you're thinking of asking Wolfram|Alpha, be warned: it gives different answers to the questions "is exp(exp(9)) an integer" (WA says "No") and "is exp(exp(9.0)) an integer" (WA says "Yes").

2

There are 2 best solutions below

1
On

We could prove it is not an integer by providing explicit bounds. If you really wanted to, you could note the following common inequality, holding for all positive $n$: $$\left(1+\frac{1}n\right)^n<e<\left(1+\frac{1}n\right)^{n+1}.$$ Which yields a series of rational bounds for $e$, where both sides converge to $e$ as $n$ heads to infinity. The point here is that, if we know that $x$ is in the interval $\left[\frac{a}n,\frac{b}{n+1}\right]$, then it follows that $$\left(1+\frac{1}n\right)^{a}<e^x<\left(1+\frac{1}n\right)^{b}.$$ Taking such an approximation for large enough integer $n$ yields arbitrarily tight rational bounds on $e^x$. From those bounds, you can prove bounds on $e^{e^x}$. I would imagine that you need to find fairly tight bounds, but it's nothing a computer couldn't do.

Now figuring out if it's rational... that's a different story.


Okay, having actually tried to make my computer do the above, it turns out that $e^x$ grows really fast near $x=e^9$ and that the above bounds work in theory, but only slowly. It doesn't quite cut it unless your computer is bigger than mine. We could swap out whatever bounds we want though - for instance, a crude bound arising from the series for $e^x$ is (assuming $x$ is positive and $n\geq 2x$). $$\left(\sum_{i=0}^n\frac{x^i}{n!}\right)<e^x<\left(\sum_{i=0}^n\frac{x^i}{n!}\right)+\frac{x^n}{n!}$$ converges much faster, and would probably yield the desired bound with some effort. You could also try rounding rationals down (in the lower bound) and up (in the upper bound) to shave some time off doing exact rational arithmetic.

0
On

Fleshing out my comment into an answer: we know that $e^9\approx 8100$, so that the integer part of $e^{e^9}$ is roughly 12,000 bits. This means that we can get a value to sufficient accuracy by:

  1. Computing $e$ to 'sufficient' accuracy (being conservative, $2^{16}$ bits should be enough here; it's not hard to do a more accurate error analysis, but the number is small enough that we can afford to be sloppy).
  2. Computing $e^9$ to similar accuracy (likely by just squaring $e$ three times and multiplying by $e$, if I were going to do this with a quick manual application) and then computing $\frac{e^9}{8192}$ (a different number could be used here to make the next steps converge faster, but that's just tuning).
  3. Computing $e^{e^9/8192}$; since $\frac{e^9}{8192}\lt 1$, this can be done fairly efficiently.
  4. Finally, computing $e^{e^9}=(e^{e^9/8192})^{8192}$ by repeated squaring.

As mentioned, none of these operations should need to work on numbers much longer than about $2^{16}$ bits, which means that all of these values will fit comfortably in memory and nothing will take more than a few million bit-operations to compute. You could probably do this to sufficient accuracy on a modern processor in well under a minute. And critically, explicit error bounds are available for the algorithms for all of these operations, so that you can assure yourself that errors won't magnify enough to swamp the result.