# If I exchange infinitely many digits of $\pi$ and $e$, are the two resulting numbers transcendental?

If I swap the digits of $\pi$ and $e$ in infinitely many places, I get two new numbers. Are these two numbers transcendental?

• Interestingly enough, take pi +k/9 for k from 0 through 9. I don't know if you can swap digits in the same place (I.e. pick pi(n) out of the symmetric group on ten indices and apply them to the nth decimal digit for each n) to end up with 1 algebraic number, much less ten of them. Gerhard "Really Messes The Numbers Up" Paseman, 2017.03.22. Mar 23, 2017 at 1:28
• @ErinCarmody there's a nice YT video from PBS infinite series about your question youtube.com/watch?v=bG7cCXqcJag Apr 14, 2017 at 2:53
• I saw it! Great explanation!!
– user10290
Apr 14, 2017 at 11:17
• If that video goes viral, you Erin Carmody will be responsible for putting MathOverflow "on the map!" Either way, it's a beautiful question, thank you :) Apr 14, 2017 at 11:54
• Haha! I'm pretty sure JDH already did that :) The video is great!!
– user10290
Apr 14, 2017 at 12:06

Nice question, Erin. Here is one quick easy thing to say.

If $\pi$ and $e$ disagree in infinitely many digits, then there are continuum many choices of the particular subset of those digits to swap, and so we get continuum many different numbers this way. Since there are only countably many algebraic numbers, it would follow that most of the time, yes, you do get transcendental numbers by doing this.

I'm unsure, however, whether one can say that all the resulting reals are transcendental. Perhaps we'll have to wait for some number theory experts to answer.

Lastly, if it happens (as seems unlikely) that all but finitely many digits of $\pi$ and $e$ are the same, then $\pi-e$ would be rational, and furthermore swapping the digits doesn't actually do anything except on those finitely many digits of difference, and so this won't affect transcendentality. In this case, there are only finitely many possible reals resulting, but they are all differing from the original reals by only finitely many digits, and so yes, they are all transcendental.

• Wow! that was nice! Mar 23, 2017 at 1:48
• Why is it clear that there are really a continuum many different numbers? Not that I think differently, but I don't know an argument why $\pi$ and $e$ have infinitely many different digits.
– Dirk
Mar 23, 2017 at 2:11
• @Dirk: If they differed in only finitely many digits, then their difference would be rational. This is known not to be the case. Mar 23, 2017 at 2:21
• @AndyPutman : Really? I'm pretty sure it is not known that $\pi - e$ is irrational. Mar 23, 2017 at 2:50
• I thought this ($\pi - e$ rational?) is a famous open problem. Apparently it's not famous, though it may well be open, and at least wikipedia thinks it is: en.wikipedia.org/wiki/… Mar 23, 2017 at 3:30

If, as is commonly believed, $\pi$ and $e$ are normal numbers, then one can use a counting argument (or entropy argument) to show that no possible transposition of $\pi$ and $e$ can produce a rational number. Indeed, if there was a rational number that could be made this way, then its digit expansion would eventually be periodic with some period $q$; by repeating this period, one can make $q$ large and even. If one looks at a given $q$-digit block of this periodic expansion, then either $\pi$ would have to share at least $q/2$ of its digits with this fixed block, or $e$ would. But if $\pi$ is normal, the former happens with density at most $\binom{q}{q/2} 10^{-q/2}$ among all the $q$-blocks, and if $e$ is normal, the latter happens with density at most $\binom{q}{q/2} 10^{-q/2}$. For $q$ large enough, the two densities sum to less than 1 (here we use the fact that the base is at least $4$ - not sure which way things will go in base $2$ or base $3$), and so one cannot actually match the given rational number.

[There ought to be some slick information theoretic way to reformulate the above argument, perhaps using the Shannon entropy inequalities, but I was not able to locate one.]

Settling the problem unconditionally looks to be at least as hard as making some major breakthrough on the normality of $\pi$ and $e$. Even ruling out a terminating decimal (i.e. that for all sufficiently large $k$, either the $k^{th}$ digit of $\pi$ or the $k^{th}$ digit of $e$ vanishes) is probably out of reach of current technology.

• You ask about base 2 or base 3, so let me point out that in base 2, it isn't true that all transpositions of normal numbers are irrational. Let $x$ be normal, viewing it as an infinite binary string. Let $y$ be the digit-wise complement of $x$, which is also normal. So we have two normal binary strings $x$ and $y$. But if we swap digits on the zeros of $x$, we get the constant $1$ sequence. So in this case, we have two normal reals with a rational transposition. Mar 23, 2017 at 21:35
• It seems likely, however, that if one has a kind mutual normality on the pair $(x,y)$, then it would work. Mar 23, 2017 at 21:42
• So there are some advantages of having 10 fingers instead of 2! Mar 23, 2017 at 22:30
• But the OP asks whether the numbers are transcendental, not whether they are irrational - I suppose your answer shows that her question is hard :) Mar 23, 2017 at 23:55
• One can save a little bit in this argument, and handle base $3$, by noting the probability to share exactly $k$ in base $b$ is ${q \choose k} (b-1)^{q-k}/ b^q$, so the probability to share at least $k$ is $\sum_{k \geq q/2} {q \choose k} (b-1)^{q-k}/ b^q \leq q 2^q (b-1)^{q/2} / b^q$ and for $b=3$ we have $2 \sqrt{2} <3$ so this goes to $0$ as $q$ goes to $\infty$. Mar 24, 2017 at 15:10

A variant of my previous answer. It is commonly believed that all irrational algebraic numbers are normal. If this is the case, then there can be at most two algebraic numbers (up to shifts by rationals) that can be obtained by transposing digits of $e$ and $\pi$.

To see this, suppose for sake of contradiction that there are three algebraic numbers $\alpha,\beta,\gamma$, no two of which differ by a rational, that can all be attained by transposing digits of $e$ and $\pi$. By the pigeonhole principle, we see that for each natural number $k$, at least one of the pairs $(\alpha,\beta)$, $(\alpha,\gamma)$, $(\beta,\gamma)$ agree at the $k^{th}$ digit. By the pigeonhole principle again, this means that one of these pairs agrees on a set of digits of (upper) density at least $1/3$. Without loss of generality we can assume that the pair $(\alpha,\beta)$ has this property, and that $\beta > \alpha$. But then, by long subtraction, the difference $\beta - \alpha$ will have digits $0$ or $9$ on a set of digits of upper density at least $1/3$, which contradicts the normality of $\beta-\alpha$. (Now I need the base to be at least seven!)

It might be possible to upgrade "up to shifts by rationals" in the above claim by "up to shifts by terminating decimals", but I have not strenuously attempted to do this. It's also worth noting that this is an example of an ineffective argument, in that no bound whatsoever is provided on the height of the algebraic numbers that might still be obtainable by transposing digits of $e$ and $\pi$, even if one had some quantitative normality bound on algebraic numbers depending on the height.

p.s. We can combine the two answers: if we assume that the sum of $\pi$ and an algebraic number, or the sum of $e$ and an algebraic number, is always normal, then the answer to the original question is positive: every transposition of $\pi$ and $e$ is transcendental. For if there was an algebraic number $\alpha$ that was achievable as a transposition, then it would have to share at least half its digits with $\pi$ or $e$, and hence one of $|\pi-\alpha|$ or $|e-\alpha|$ would have digits $0$ or $9$ on a set of upper density at least $1/2$, contradicting the normality of these numbers. (Now I need base at least five.)

• Awesome! That is very interesting that there would be at most two. Why is it commonly believed that all irrational algebraic numbers are normal?
– user10290
Apr 14, 2017 at 17:00
• See mathoverflow.net/questions/173414/… . It seems the conjecture was first made by Borel in ams.org/mathscinet-getitem?mr=34544 Apr 14, 2017 at 17:25
• Thanks! And sorry you said two algebraic irrationals from transposing digits "up to shifts by rationals". Trying to absorb this as best I can.
– user10290
Apr 14, 2017 at 19:53

Another easy thing to say is that there are at least 9 transcendental numbers in (0,1) such that any rearrangement of their digits place wise gives 9 other transcendental numbers.

Proof Start: list the countable many algebraic numbers in decimal form, including those with two representations (having terminating nines). Take the nth decimal digit after the point from the nth number, and don't use it in that place in any of the nine numbers you will form. Rest is left to the enthused reader.

Gerhard "It's Like Telling Old Jokes..." Paseman, 2017.03.23.

• A similar argument produces an infinite list of such numbers. Indeed, one can have continuum many such numbers: consider the numbers whose even digits diagonalize (uniformly) against the algbraic numbers, and whose odd digits are arbitrary. Swapping digits on on two of these on an arbitrary set will still diagonalize against the algebraics, and hence will be transcendental. Mar 24, 2017 at 1:35
• You can probably extend this to more numbers with care. (Unless you are Joel, in which case you can also do it with abandon.) Gerhard "Reduce And Reuse And Recycle" Paseman, 2017.03.23. Mar 24, 2017 at 1:36
• Can you reverse this argument? Given $\pi$ and $e$, can you find an enumeration of algebraics that guarantees the rearrangements will be transcendental? And if not in this universe, then in some other? Gerhard "Maybe Erin Meant That Question" Paseman, 2017.03.23. Mar 24, 2017 at 2:11
• Indeed, I think you can, by organizing the algebraics by place value and then constructing the list so that you end up not skipping any. This might answer her question positively. Gerhard "Or Present A New Paradox" Paseman, 2017.03.23. Mar 24, 2017 at 2:16
• Thanks for more ways to generate transcendental numbers!
– user10290
Mar 24, 2017 at 2:17

Note that the sum of the swapped numbers is the same as $\pi + e$ itself, meaning for them to be simultaneously algebraic would imply that $\pi + e$ is algebraic (an open problem as far as I know). I don't know if you say anything about the case where just one is algebraic.

Here's an argument that one should expect that the two numbers gotten this way must be transcendental. Really, what I am showing is that the locus of $(a,b)$ in $\mathbb{R}\times\mathbb{R}$ where one can get an algebraic number by swapping digits of $a$ out for digits of $b$ is of measure $0$.

I'm going to ignore difficulties coming from infinite ending sequences of $9$s (they form a measure $0$ set, so they don't change anything).

To do this, it suffices to show that this locus is a countable union of measure $0$ sets. As there are a countable number of algebraic numbers, we can restrict attention to a single one $\alpha$. Also, we can restrict to looking at $[0,1]\times[0,1]$ because an algebraic number stays algebraic when we add an integer.

Now, we have $2^n$ choices of how to split the first $n$ digits of $\alpha$, and each splitting gives us a set of measure $\frac{1}{10^n}.$ As $\displaystyle\lim_{n\rightarrow\infty}\frac{2^n}{10^n}=0,$ we see that our set has measure $0$, as desired.

• Isn't this the same as Joel David Hamkins' answer?
– user21349
Mar 25, 2017 at 21:05
• @BenCrowell: I don't see how - I'm interpreting his answer as showing that for any choice of $a$ and $b$ with $a-b$ irrational, most swaps will lead in transcendentals, while I'm showing that for most choices of $a,b$, all swaps will lead to transcendentals.
– dhy
Mar 25, 2017 at 23:15
• My argument doesn't require $a-b$ irrational; just that $a$ and $b$ individually are transcendental. Mar 27, 2017 at 18:29

I'd like to reiterate, though with a renewing idea that might be THE answer, on Terry's answer.

Pi and e are normal numbers, let's agree upon that. Now, pi = 3.141592653...7....7...7.....7..... e = 2.71828182845904...

Let's introduce a mapping function alpha(e) that maps every 7 in pi to each digit, after the decimal point, in e. Clearly, pi is normal, and hence, there would be enough 7s in the "reserve" to map to every number (after decimal point) in e. Now, let me swap all such digits alpha(e) returns to me.

This gives two new numbers, pi* and e*, of which e* is rational (2.77777....7...).

So, YES. But you can rather introduce a swap function like alpha (x), rather than choosing to swap infinitely.

Thank you.

• You seem to be moving digits to a different place rather than just swapping them. That's a different (and rather trivial) question. Apr 14, 2018 at 10:09
• It is not known whether $\pi$ and $e$ are normal numbers. Also, you don't need normality for what you've said: all you need is that some digit appears infinitely often in $\pi$. And this is true for any number ... Apr 14, 2018 at 16:31
• @Emil Jerabek, "exchanging infinitely digits" is what the question asks. Apr 15, 2018 at 10:35