# Finding all positive integer solutions to $(x!)(y!) = x!+y!+z!$

The equation is $(x!)(y!) = x!+y!+z!$

where $x,y,z$ are natural numbers.

How to find out them all?

-

Here's a start. We may assume $x\le y$. The case $x=1$ is trivial. The case $x=2$ gives $y!=z!+2$, which obviously has no solution. So assume $x\ge3$. Then $x!+z!\ge5y!$, so $z!\ge4y!$, so $z\gt y$. Suppose there is a prime number $p$ with $x\lt p\le y$. Then $p$ divides $y!$ and $z!$ but not $x!$ so we get a contradiction from $x!=x!y!-y!-z!$. So we have shown that if $x\le y$ then there can't be a prime $p$ with $x\lt p\le y$.

-
I think let $p=3y!$ in your prove, all things are done. p is not necessary a prime. –  Leitingok Dec 6 '11 at 8:34
I don't understand. It is not true that $3y!\le y$, and it is not true that $3y!$ divides $y!$. –  Gerry Myerson Dec 6 '11 at 12:33
Hi, Gerry. I think your argument gives the whole thing. I've seen arguments of this sort, using the $\mbox{ord}_p (n)$ I defined, in contest books. –  Will Jagy Dec 6 '11 at 18:44
Well, my argument (or Ross Millikan's) together with your not-the-least-bit-trivial contribution. –  Gerry Myerson Dec 7 '11 at 3:19
Thank you Gerry. –  Will Jagy Dec 7 '11 at 3:38

There won't be very many as the factorials are very sparse. I suspect you have already listed them all. We can assume $x \le y$. If $x!=1$ the RHS is at least $2$ greater than the left. If $x!=2, y=z$ the RHS is $2$ greater than the left, but there are no factorials with a difference of $2$. If $x! \ge 6$, divide both sides by $y!$. The LHS is an integer while the RHS is not unless $x=y$. Now you are looking for solutions to $(x!)^2=2(x!)+z!$

-

Gerry's argument shows, for $3 \leq x \leq y < z,$ that in fact $x=y.$ Otherwise, if we assume $y \geq x+1,$ there is some prime $p | (x+1),$ which might be $x+1$ itself or might be smaller. Suppose we define $\mbox{ord}_p (n)$ to be the largest exponent $k$ such that $p^k | n.$ We have $\mbox{ord}_p (y!) \geq 1 + \mbox{ord}_p (x!),$ also $\mbox{ord}_p (z!) \geq 1 + \mbox{ord}_p (x!).$ Indeed, we have a contradiction, since $x! = x! y! - y! - z!,$ and everything on the right hand side is divisible by $p^{1 + \mbox{ord}_p (x!)}.$

Alright, so $$x=y.$$ We do, indeed, have the solution $x=3, y=3, z=4.$

If $x \geq 4,$ then $\mbox{ord}_2 (x!) \geq 3.$ From $x=y$ we have $(x!)^2 = 2 x! + z!.$ Now, $\mbox{ord}_2 (x!)^2 \geq 3 + \mbox{ord}_2 (x!),$ while $\mbox{ord}_2 2(x!) = 1 + \mbox{ord}_2 (x!).$ As a result, $\mbox{ord}_2 (z!) = 1 + \mbox{ord}_2 (x!).$ We cannot have $z \geq x + 4$ because then there would be two extra even numbers dividing $z!.$ So $$z \leq x + 3.$$

However, Stirling's formula shows that, for $x \geq 6, \; z > x + 3$ where we regard $z$ as a real number here. Indeed, for the next few integral $x,$ we get the real solutions $(4,4,5.833), \; (5,5,7.504), \; (6,6,9.156), \; (7,7,10.814), \; (8,8,12.480), \; (9,9,14.154).$ Stirling's gives me $$z > \; 2 x \; \left( 1 - \frac{\log 2}{\log x} \right)$$

The only solution in natural numbers is $(x=3, \; y=3, \;z=4)$

ADDED: the function I have been calling $\mbox{ord}_p (n)$ is called $v_p(n)$ in Problems from the Book by Titu Andreescu and Gabriel Dospinescu, available at AOPS or XYZ

EDIT, December 8::This is sensible notation, as the function $v_p$ is the "$p$-adic valuation," see page 25, Definition 2.1.2, of $p$-adic Numbers by "Fernando Q. Gouvea," that being one of the pen-names of Mariano Suárez-Alvarez. Mariano wanted to include a letter "i" somewhere in the last name, have the full set, but was told that would seem inauthentic. P_ADIC_BOOK

-
Pushing the maximum on edits. $v_p$ is good notation in English, I am not sure what Hensel wrote. Also, 'i' for the full set of vowels. About Fernando and Mariano, see math.stackexchange.com/questions/73565/… and math.stackexchange.com/questions/73832/… –  Will Jagy Dec 8 '11 at 22:01