Open-access mathematical research insights
About Contact
Home / Erdos Problems / Problem #399

Problem #399: Is it true that there are no solutions to\[n! = x^k\pm...

Is it true that there are no solutions to\[n! = x^k\pm y^k\]with $x,y,n\in \mathbb{N}$, with $xy>1$ and $k>2$?

Problem Statement

Is it true that there are no solutions to\[n! = x^k\pm y^k\]with $x,y,n\in \mathbb{N}$, with $xy>1$ and $k>2$?
Categories: Number Theory Factorials

Progress

Erdős and Obláth [ErOb37] proved this is true when $(x,y)=1$ and $k\neq 4$. Pollack and Shapiro [PoSh73] proved there are no solutions to $n!=x^4-1$. The known methods break down without the condition $(x,y)=1$.

Jonas Barfield has found the solution\[10! = 48^4 - 36^4=12^4\cdot 175.\]Erdős and Obláth observed that the Bertrand-style fact (first proved by Breusch [Br32]) that, if $q_i$ is the sequence of primes congruent to $3\pmod{4}$ then $q_{i+1}<2q_i$ except for $q_1=3$, together with Fermat's theorem on the sums of two squares implies that the only solution to $n!=x^2+y^2$ is\[6!=12^2+24^2.\]Cambie has also observed that considerations modulo $8$ rule out any solutions to $n!=x^4+y^4$ with $(x,y)=1$ and $xy>1$.

This is discussed in problem D2 of Guy's collection [Gu04].

Source: erdosproblems.com/399 | Last verified: January 14, 2026

Stay Updated

Get weekly digests of new research insights delivered to your inbox.