I would like prove that the following diophantine equation is unsolvable: $m!+27=n^3$.


Thanks in advance.



A hard diophantine equation: $m!+27=n^3$
I am happy to report that the equation has no solution. I kept my original response, and put the remaining arguments in the "EDIT" section below.


Here is a quick proof that there are only finitely many solutions.


We use $m!=(n-3)(n^2+3n+9)$. Here $n$ is divisible by $3$, hence $n^2+3n+9$ is not divisible by any prime $p\equiv 2\pmod{3}$. In other words, all the prime divisors $p\equiv 2\pmod{3}$ of $m!$ are contained in $n-3$ with multiplicity. It follows, with the usual notations, that


$$ \frac{\log m!}{3}>\log(n-3)\geq\sum\_{p\equiv 2 \ (3), \ p\leq m}v\_p(m!)\log p> \sum\_{p\equiv 2\ (3), \ p\leq m} \left(\frac{m}{p}-1\right)\log p.$$


The left hand side is $\sim (m\log m)/3$, while the right hand side is $\sim (m\log m)/2$ by Dirichlet's theorem. Hence for large $m$ the inequality must fail.


**EDIT.** Assume that $m\geq 1000$, and denote by $\chi$ the nontrivial character modulo $3$. Then
$$ \sum\_{p\leq m}\frac{\chi(p)\log p}{p}<\sum\_{n\leq m}\frac{\chi(n)\Lambda(n)}{n}-\sum\_{p\leq m,\ p\neq 3}\frac{\log p}{p^2+p}. $$
This implies, in combination with some ideas of Bordelles (cf. the proof of (4.2) [here](https://www.emis.de/journals/JIPAM/article539.html?sid=539 "Olivier Bordellès: An Explicit Mertens' Type Inequality for Arithmetic Progressions")), that
$$ \sum\_{p\leq m}\frac{\chi(p)\log p}{p}<3\left|\frac{L'(1,\chi)}{L(1,\chi)}\right|+1.53<2.64\ .$$
By including the contribution of the prime $p=3$ to $n-3$ in the original inequality, and using also some classical bounds by Rosser and Schoenfeld (cf. (3.15) and (3.21) [here](https://doi.org/10.1215/ijm/1255631807 "J. Barkley Rosser. Lowell Schoenfeld. Approximate formulas for some functions of prime numbers. Illinois J. Math. 6 (1) 64 - 94, March 1962.")), it follows that
$$\frac{m(\log m-0.9)}{3}>\frac{m(\log m-6.1)}{2}\quad\text{for}\quad m>e^{16.5}.$$
Hence $m < e^{16.5}$. I checked with SAGE that in fact
$$\sum\_{p\leq m}\frac{\chi(p)\log p}{p}<-0.63\quad\text{for}\quad e^{16.5}>m>e^{7}.$$
This can be used to improve the previous bound to
$$\frac{m(\log m-0.99)}{3}>\frac{m(\log m-2.92)}{2}\quad\text{for}\quad e^{16.5}>m>e^{7},$$
which in turn forces $m < 1000$. The above shows that all solutions of the original equation satisfy $m < 1000$. However, I checked with SAGE that in this range the equation has no solution.


