# Does a generalized difference of powers formula exist?

The identity $$\left(\frac{n+1}{2}\right)^2-\left(\frac{n-1}{2}\right)^2=n$$ can be used to represent any number as difference of two squares. (Note that this formula gives integer values when $$n$$ is odd.) I have been looking for a similar formula for cubes, quartics, etc., but have been unsuccessful in finding them, which leads me to believe that this problem is related to Fermat's Last Theorem, and can be disproven with it.

I have been using the similar structure and attempting to find one by trial and error. Here's some example attempts: (that don't work) $$\left(\frac{n+1}{3}\right)^3-\left(\frac{n-1}{3}\right)^3=n.$$ $$\left(\frac{n!+1/3}{n!}\right)^3-\left(\frac{n!-1/3}{n!}\right)^3=n.$$ After much effort, it seems formulas for higher powers do not exist, so how might one prove it?

• It does not exist for $n\ge3$ by FLT: a cube of an integer cannot be a difference of two non-zero cubes. Apr 7, 2022 at 17:48
• @markvs How is that relevant? Apr 7, 2022 at 18:21
• Any difference of cubes formula would involve the cubic terms cancelling, but then how would you force the quadratic terms to cancel? What kind of expressions are you even looking for / functions are you allowing to be in the parentheses? I mean, obviously $(\sqrt[3]{n^3+1})^3-1^3=n$ works, for example. No linear functions of $n$ in parentheses can work (exercise!). Apr 7, 2022 at 18:24
• @markvs True, I guess that rules out formulas which produce only integers in the parentheses. (I meant relevant to the problem, not to me personally.) Apr 7, 2022 at 18:28
• Following up, here's the best I've been able to do. It's not quite the difference of cubes, but it has the fun of requiring only small obfuscation to make everything on the left a 3. $$\left( \frac{3}{3-\frac33}\right) \left( \left(\frac{x+3}{3}\right)^3 - \left(\frac{x-3}{3}\right)^3 \right) -3 = x^2$$ Yes, we could replace the denominators with 18^(1/3), but that's obviously outside the spirit of what we're trying to do. Apr 8, 2022 at 0:21

$$\large\bf{Proposition}$$

If $$P(x)$$ and $$Q(x)$$ are any polynomials with coefficients in $$\mathbb{C}$$ which are not both constant, then the degree of $$R(x) = P(x)^n - Q(x)^n$$ will be at least $$n-1$$ if it is non-zero.

$$\large\bf{Corollary}$$

The above proposition implies that there are no polynomials with $$P(x)^n - Q(x)^n = x$$, since $$P(x)$$ and $$Q(x)$$ cannot both be constant and the degree $$1$$ of the RHS is not at least $$n-1 \ge 2$$.

$$\large\bf{Proof}$$

Assume that the degree of $$R(x)$$ is at most $$n-2$$. Start by noting that, over the complex numbers, there is af factorization

$$R(x) = P(x)^n - Q(x)^n = \prod_{k=1}^{n} (P(x) - \zeta^k Q(x))$$

where $$\zeta = e^{2 \pi i/n}$$. Since the degree of this product must equal the degree of $$R(x)$$, which lies in $$[0,\ldots,n-2]$$ by assumption, it follows that all the factors are non-zero and at least two of the factors (say for $$k = i$$ and $$k = j$$) must be constant. But this means that there are constants $$c_i$$ and $$c_j$$ such that:

$$P(x) - \zeta^i Q(x) = c_i,$$ $$P(x) - \zeta^j Q(x) = c_j,$$

But since $$\zeta^i \ne \zeta^j$$ we can solve for $$P(x)$$ and $$Q(x)$$ and see that they are both constant, a contradition.

For variations and generalizations of this argument, see Mason–Stothers theorem.

• Maybe I am missing something, but this argument doesn't seem to work. If we use $P(x)=Q(x)$ with $\deg(P(x))>2$ then the argument implies that $\deg(R(x))>1$ but clearly $R(x)=0$. Edit: thinking about it it seems like it works if you are more careful with zeros, i.e. if $P(x)^n$ is not $Q(x)^n$ the argument is fine. Apr 9, 2022 at 0:12
• @ClydeKertzer If there are no solutions with complex polynomials, there are certainly no solutions in polynomials with rational coefficients either. Apr 9, 2022 at 16:34
• How do we know that If $P(x)$ and $Q(x)$ are any polynomials with coefficients in $\mathbb{C}$ which are not both constant, then the degree of $$R(x)=P(x)^n−Q(x)^n$$ is at least $n-1$? Apr 11, 2022 at 15:30
• @ClydeKertzer Did you actually try reading the answer? The entire point of my answer is exactly to prove this claim. The "first line" is the statement, the "second line" is the remark that this answers your question, and then the rest of the answer is giving a proof of the first line. Apr 15, 2022 at 15:25
• @MasonJar: It may be that Clyde Kertzer didn't immediately follow the argument well enough to see that, and was still working their way through it. It may be helpful (though not strictly speaking necessary) to give markers like "Proposition" and "Proof" to further guide them, but that's just one point of view. Apr 16, 2022 at 17:02

It's not clear what restrictions you put on the expressions, but if you for example consider polynomials over rationals, then it's not hard to show that is indeed impossible. The argument below uses Fermat's last theorem, but you can completely avoid it, see Mason's answer.

Assume for a contradiction that $$k\geq 3$$ and we have polynomials $$f,g\in \mathbb{Q}[x]$$ such that $$f(n)^k-g(n)^k=n$$ for all integers $$n$$ (then in fact it must hold for all complex numbers $$x$$). Choose any integer $$a\neq 0$$ and put $$n=a^k$$. Let $$f(n)=\frac{p}{q}$$, $$g(n)=\frac{r}{s}$$, $$q,s\neq 0$$ be the rational representations, we have $$\Bigl(\frac{p}{q}\Bigr)^k-\Bigl(\frac{r}{s}\Bigr)^k=a^k.$$ Multiplying by $$(qs)^k$$ we get $$(ps)^k-(rq)^k=(aqs)^k.$$ The terms are all integers and by Fermat's last theorem this is only possible if one them is $$0$$. Since $$a,q,s \neq 0$$, this means either $$p=0$$ or $$r=0$$, in other words $$f(n)=0$$ or $$g(n)=0$$. Since $$a$$ was chosen arbitrary, this means one of $$f,g$$ attains $$0$$ at infinitely many points, hence it must be the zero polynomial. Say $$g(x)=0$$, then we have $$f(x)^k=x$$, impossible by simple polynomial degrees comparison on both sides. Similarly if $$f(x)=0$$. Hence no such polynomials $$f,g$$ exist. $$\tag*{\square}$$

Very similarly we can also resolve case where $$f,g$$ are polynomials in $$n!$$ (to cover one of your attempts). Indeed, let $$f(n!)^k-g(n!)^k=n$$ and the same argument as above implies one of $$f,g$$ is zero infinitely often (since $$n!$$ is increasing for $$n>1$$, $$f$$ or $$g$$ is actually zero on infinitely many distinct (important!) values), hence again we have the zero polynomial. Then $$f(n!)^k=n$$ or $$-g(n!)^k=n$$ for all $$n$$, which leads to contradiction (for example in the former $$n=2$$ implies $$\sqrt[k]{2}$$ is rational, impossible). You can think of generalizing the factorial away, but you need to make sure the function you replace it with takes infinitely many distinct values, otherwise the argument does not go through, I will leave that to you...

Without any such restrictions on $$f,g$$, you can construct counterexamples by letting $$f(n)$$ be arbitrary and then just put $$g(n)=\sqrt[k]{f(n)^k-n}$$, but that is not very interesting...

• This is just strictly worse than the other answer, using Fermat's Last Theorem instead of unique factorization to prove a weaker result. Apr 15, 2022 at 22:57
• @ThePhoenix I agree, I've made that clear in the text now
– Sil
Apr 16, 2022 at 5:56