Finding Solutions to a Diophantine Equation with Factorials

How many ordered pairs of positive integers $(a, b)$ are there such that $a!+\dfrac{b!}{a!}$ is a perfect square?

Is the number of solutions finite?

Source: Ran into it on Facebook.

I have plugged in small numbers to see that $(1,4), (4,4)$ etc. work. But other than that I have no idea how to approach. Any help will be appreciated.

Thanks!

• a = 7 and b = 7 is another solution – bobbym Jul 13 '14 at 11:59
• Duplicate of this. – Lucian Jul 13 '14 at 18:26

Suppose $a!=y$, then, $y+b!/y=x^2$ for some integer $x$, we have, $y^2-yx^2+b!=0$ a quadratic in $y$, so the discriminant must be a square, hence, $(x^2)^2-4b!=z^2$ for some $z$, we have, $(x^2)^2-(b!)(2)^2=z^2$, a rational Pell equation
• So, what is the conclusion? Have you managed to answer the case $a=1$ at all? – punctured dusk Jul 22 '14 at 20:08
I do not think this can be answered. Supposing you say that $a!+\dfrac{b!}{a!}=n^2$ has a finite number of solutions. Then we could say that for a = 1! and $b \neq 1!$ there are a finite number of solutions. But that is the well known Brocard's problem which is still an open problem. http://en.wikipedia.org/wiki/Brocard%27s_problem