<s>[INST] How many pairs of positive integer $(p,q)$ which satisfy $(p+1)!+(q+1)!=p^{2}q^{2}$ I'm sorry before if this suspected to be duplicate question. 
The problem is : 

How many pairs of positive integer $(p,q)$ which satisfy
  $(p+1)!+(q+1)!=p^{2}q^{2}$

I tried to expand the factorial but i can't continue , I've put it on wolframalpha but i dont get any step by step solution there. Is there any kind of theorem or somehting would help me to solve this?
 [/INST] $p = 1, q = 1$ or $p = 1, q = 2$ or $p = 2, q = 1$ have no solution.
$p$ and $q$ both cannot be odd. 
Assume $p \ge 2$ and $q \ge 2$ and assume both $p,q$ even
Let $p = 2^m p_1$ where $p_1$ is odd and $q = 2^n q_1$ where $q_1$ is odd
$(p+1)! = (2^mp_1 + 1)! = (2^mp_1 +1)(2^mp_1!) = 2^a x$, where $a = 2^m -1$, and $x$ is odd
$(q+1)! = (2^nq_1 + 1)! = (2^nq_1 +1)(2^nq_1!) = 2^b y$, where $b = 2^n -1$, and $y$ is odd
So $2^ax + 2^by = 2^{2m+2n}p_1^2 q_1^2$
If $a > b$, then $2^b(2^{a-b}x + y) = 2^{2m+2n}p_1^2 q_1^2$
For a solution to exist, we need $b = 2m + 2n \implies 2^n - 1 = 2m + 2n$ not possible as odd and even
If $a = b$ implies one of $p,q$ is odd and other is even, a case we consider next. 
So let us consider the case where $p$ is even, $q$ is odd.
Let $p = 2^m p_1$ where $p_1$ is odd and $q+1 = 2^n q_1$ where $q_1$ is odd
$(p+1)! = (2^mp_1 + 1)! = (2^mp_1 +1)(2^mp_1!) = 2^a x$, where $a = 2^m -1$, and $x$ is odd
$(q+1)! = (2^nq_1)! = 2^b y$, where $b = 2^n -1$, and $y$ is odd
So $2^ax + 2^by = 2^{2m} p_1^2 q^2$
If $a > b$, then $2^b(2^{a-b}x + y) = 2^{2m}p_1^2 q^2 \implies b = 2m$ not possible as b is odd. 
If $a = b$ then $2^b(x+y) = 2^{2m}p_1^2 q^2$. Let highest power of $2$ in (x+y) be c. 
So we need $2^{b+c} = 2^{2m} \implies b+c = 2m \implies 2^m -1 + c = 2m$. 
For $c=1$, we get $2^m = 2m \implies 2^{m-1} = m \implies m = 2 \implies p = 4$. 
This implies $q = 3$ as $a = b$ implies $p$ and $q$ differ by $1$. 
For all other $c$ there is no solution. 
So only solution is $4,3$. 
</s>