TITLE: Integer ordered pairs (x,y) satisfying $x^2 - y! = N$
QUESTION [6 upvotes]: This question arose by looking at a similar question, which has $N = 2001, 2013$. In it, my solution was that since we have a prime $p$ (in this case 3) which divides $N$ but $p^2$ doesn't, hence we merely need to consider the finitely many cases when $y < 2p$.
This argument easily extends to cases where $N$ has a prime power with an odd exponent, which leaves the cases where $N$ is a perfect square. I don't know how to approach this case, does anyone know how to solve
$$x^2 -n^2 = y!?$$
Are there finitely many solutions for each $n$?
Note: I believe that arguments by quadratic residues would not work.

REPLY [2 votes]: Even for $n=1,$ which is called Brocard's problem, it is an open question whether this equation has finitely many solutions. There is extensive literature devoted to equation of the type $P(x)=m!.$ I would recommend to look at the article of Berend and Armes
where they treat a few important special cases.