Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been running in circles with this for a while now.

It seems that the only solution is $(n,m,k)=(2,3,2)$ but I don't know how to prove it.

Things I have noticed: WLOG $n\geq m$ we see that $k^2$ is a multiple of $m!$. I have a feeling that this might be key; maybe there is a restriction on squares and factorials which is only possible for $n=k=2$... I tried manipulating things, the only potentially useful expression I could come up with was:


I have tried modular arithmetic on both sides to get some additional conditions but nothing useful came up. Maybe we could make use of $m!n!<(m+n)!$ to bound $k^2?$ (I doubt it though since the RHS blows up too fast).

I don't know if any of this information is useful though.

share|cite|improve this question
Technically, this is not a Diophantine equation, since diophantine equations only allow polynomials, and $n!$ is not a polynomial in $n$. – Thomas Andrews Mar 4 '13 at 18:21
In your WLOG, you should have $k^2$ is a multiple of $m!$ – Ross Millikan Mar 4 '13 at 18:33
@RossMillikan Thanks. – Little miss sunshine Mar 4 '13 at 18:44
up vote 11 down vote accepted

When $n\geq 4$, $n!-1\equiv -1\pmod 4$, so when $n\geq 4$, some prime $p\equiv -1\pmod 4$ divides $n!-1$ and hence divides $k^2+1$. But that can't be true for $p\equiv -1 \pmod 4$.

So we know $m,n<4$. Now just try all the cases.

share|cite|improve this answer
I feel stupid for not seeing this. Thank you! :) – Little miss sunshine Mar 4 '13 at 18:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.