Prove the existence or the non-existence of a couple of numbers ($n$,$m$) such that $n^2=m!$ In recent days, while I was doing exercises on combinatorics, I thought if a number $m!$ could be a perfect square. I proved to demonstrate it through the prime factorization. My attempt: $$k=m!=p_1^{a_1}\cdot p_2^{a_2}\cdot p_3^{a_3}....\cdot p_n^{a_n}$$
with $a_1,a_2,..,a_n$ that have to be even. Now if there exists a prime number $p_j$ between $\frac {k}{2}<p_j<k$ this prime number in the prime factorization the exponent ($a_j$) relative to the prime number $p_j$ is equal to $1$ ($a_j=1$) because the number $k$ isn't a multiple of $p_j$; for example $12!$ isn't a perfect square because the prime numbers $7$ and $11$ $6<7,11<12$ aren't divisors of $12$. 
My question
There exist a prime number $p_j$ between $k$ and $\frac {k}{2}$ and how can I prove if there exist or not exist a number $m!=n^2$?
 A: Let $m\ge 3$ (otherwise $(m,n)=(0,\pm 1),(1,\pm 1)$).    
Assume for contr. $\ n^2=m!\ $ for some $n\in\Bbb Z$.   
Then $\ \exists p\in\Bbb P\ $ with $\ m/2<p<m\ $ by Berdrand's postulate.   
$\,\Rightarrow\, p\mid m!\,\Rightarrow\, p\mid n^2\,\Rightarrow\, p^2\mid n^2\,\Rightarrow p^2\mid m!$. But $m<2p$, contr.
A: Here's a sledge-hammer
to crack this peanut:
A question on primes and equal products
It references this:
Erdos and Selfridge, [The product of consecutive integers is never a power][1], Illinois J Math 19 (1975) 292-301.
The paper is here:
Link
A: Suppose m! = n^2,  m,n> 1.
We are guaranteed that a prime exists between m!/2 and m! by Bertrand's postulate.Clearly,that prime can appear only once,but it is a factor of m!
and therefore a factor of n^2.Since prime,it divides n,and so divides n^2 twice,which is impossible,and we have a contradiction.So m = n = 1 is the only
solution.    Edwin Gray
A: Subtracting $m^2$ from both sides of your equation we get $$n^2-m^2=m!-m^2 \tag{0} $$ $$ (n-m)(n+m)=m\left((m-1)!-m\right), $$ that is, assuming $m\ne0$, $$ \frac{n}{m}+1=\frac{(m-1)!-m}{n-m}.\tag{1}$$ We do know that $n$ is a multiple of $m$, therefore both sides of $(1)$ are integer. Now, $(1)$ is equivalent to $$\frac{n}{m}=\frac{(m-1)!-n}{n-m} $$ $$\frac{n}{m^2}=\frac{\frac{(m-1)!}{m}-\frac{n}{m}}{n-m} \tag{2}$$ as well as $$\frac{n}{m^2}+\frac{1}{m}=\frac{\frac{(m-1)!}{m}-1}{n-m} \tag{3}.$$ But while both the right-hand sides of  $(2)$ and $(3)$ are integer, since $(0)$ being rewritable as $$m^2\left(\left(\frac{n}{m}\right)^2 -1\right) =m( (m-1)! - m)$$ yields that $m$ divides $(m-1)!-m$, and so $(m-1)!$, their left-hand sides can be simultaneously integer if and only if $m=1$. Therefore, the only couples of solutions are $(m,n)=(0,\pm1),(1,\pm1)$.
A: gcd is an associative binary operation. gcd(m,m-1)=1. Thus gcd of terms involved in m! is 1. It follows that m! cannot be a perfect square.
