# Prove that $2^{n}+1$ is not a cube of an integer for all $n\in\mathbb{N}$ [duplicate]

Prove that $$2^n+1$$ is not a cube for any $$n\in\mathbb{N}$$.

I managed to prove this statement but I would like to know if there any other approaches different from mine.

If existed $$k\in\mathbb{N}$$ such that $$2^n+1=k^3$$ then $$k=2l+1$$ for some $$l\in\mathbb{N}$$. Then $$(2l+1)^3=2^n+1 \iff 4l^3+6l^2+3l=2^{n-1}$$. As I am looking for an integer solution, from the Rational Root Theorem $$l$$ would need to be of the form $$2^j$$ for $$j=1,...,n-1$$. But then

$$4(2^j)^3+6(2^j)^2+3\times2^j=2^{n-1} \iff 2^{2j+2}+3(2^{j+1}+1)=2^{n-1-j}$$

the LHS is odd which implies that $$j=n-1$$. Absurd.

• One other easy approach: if $2^n+1$ is a cube, then there's some $s$ with $2^n=s^3-1$. Factor the RHS and consider what the parities of the two factors can be (keeping in mind that both must be powers of $2$ themselves). Aug 20, 2020 at 0:13
• You don’t need the rational root theorem. You have that $l$ is a factor of $2^{n-1},$ and hence must be of the form $2^j.$ Also, there is no immediate reason that $j=0$ is not allowed. Also, what is $k?$ Aug 20, 2020 at 0:54
• @ThomasAndrewz $j=0$ is just a simple calculation. I have edited, thank you.
– user723846
Aug 20, 2020 at 1:00
• are you familiar with Mihăilescu's theorem? Aug 20, 2020 at 1:05

Here is a different approach.

Modulo $$7$$, there aren't so many cubes, so that can be a good setting to investigate such problems:

$$2^n+1\equiv 2, 3,$$ or $$5\pmod7$$, but $$m^3\equiv0, 1,$$ or $$6\pmod 7$$.

• I'd never seen the relative paucity of cubes mod 7; that's a good thing to remember. Thank you! Aug 20, 2020 at 16:27
• You're welcome, @StevenStadnicki; there's also a paucity of cubes mod $9$, though that didn't help in this problem; see my answer to this question Aug 20, 2020 at 16:39
• When $k$ divides $\varphi(n)$, the map $x \to x^k$ mod $n$ will only hit a fraction of residues. In this case, $3$ divides $\varphi(7)=7-1$. For example, the same thing happens with $5$th powers mod $11$. Aug 20, 2020 at 19:46
• Alex, it seems like any greater odd power. For $3$, we have $3 \mid \varphi(7) = 7-1$. For $5$, we have $5 \mid \varphi(11) = 11-1$. For $7$, we have $7 \mid \varphi(15) = 15-1$. Ad infinitum. Jan 19, 2021 at 12:46

Here is a parity-based solution that avoids the rational root test.

If $$2^n+1=m^3$$, then $$2^n=m^3-1=(m-1)(m^2+m+1)$$, so $$m-1=2^k$$ for some $$k\le n$$, and

$$2^n+1=\left(2^k+1\right)^3=2^{3k}+3\cdot2^{2k}+3\cdot2^k+1\,.$$

Then $$2^n=2^k\left(2^{2k}+3\cdot2^k+3\right)$$, so $$2^{n-k}=2^{2k}+3\cdot2^k+3$$ is odd and greater than $$1$$, which is impossible.

Added: As one can see from the comments below, there are many ways to continue this argument after the first line. I took what I think of as the follow-your-nose approach, i.e., the most obvious, straightforward one, not necessarily the neatest. (And speaking of neatest, I quite like the one by rtybase.) Then again, folks’ noses don’t always point in the same direction. :-)

• Or $m^2+m+1=2^k \Rightarrow m^2+m=2^k-1$, then LHS is even and RHS is odd, except when $k=0$. Aug 20, 2020 at 0:33
• @rtybase: Yep, that works too. Aug 20, 2020 at 0:37
• Or $$gcd(m-1,m^2+m+1)=gcd(m-1, (m-1)m+2m-2+3=gcd(m-1,3)=1$$ or $=3$. Hence it is 1. Since $m-1<m^2+m+1$, $m-1=1, m^2+m+1=2^k$, a contradiction. Aug 20, 2020 at 1:26
• It ca not be a perfect square too. I do not think it can be any power of an integer. Aug 20, 2020 at 4:55
• @sirous: $2^3+1=9=3^2$ Aug 20, 2020 at 5:24

Invoking an argument more powerful than needed for this:

there cannot be any solutions to $$2^n+1=m^3$$ (i.e., $$m^3-2^n=1$$) by Mihăilescu's theorem,

which states that $$2^3$$ and $$3^2$$ are the only two powers of natural numbers

whose values are consecutive.

Suppose $$2^n + 1 = k^3$$. Then $$2^n = k^3 - 1 = (k^2 + k + 1)(k - 1)$$. So both factors are even ($$k = 2$$ doesn't work; the first factor is at least $$3^2 + 3 + 1 = 13$$, it can't be 1). But the first factor is always odd, contradiction.

Let $$2^n=m^3-1\\\implies 2^n=(m-1)(m^2+m+1)\\\implies(m-1)=2^a\text{ and }(m^2+m+1)=2^b\\\implies3m=(m^2+m+1)-(m-1)^2=2^b-2^{2a}$$ Now, since $$m$$ is odd, we must have $$a=0$$ or $$b=0$$. But $$(m-1)<(m^2+m+1)$$ implies $$a=0$$. This implies $$m=2$$ a contradiction since $$m$$ must be odd.

Let's set the cubes to $$8m^3$$ and $$8m^3+12m^2+6m+1$$. As $$8m^3$$ is even and it doesn't works for $$n=0$$, that's impossible. For the second one, ignoring the $$1$$ you can factor it to $$2m(4m^2+6m+3)$$. Since there ain't any natural in which $$4m^2+6m+3=1$$ it is impossible to be a $$2^n$$ for natural $$n$$.