[Math] Circle $x^2 + y^2 = n!$ doesn’t hit any lattice points for any $n$ except for $0$, $1$, $2$ and $6$ or does it

analytic-number-theoryfactorizationnt.number-theoryprime numbers

I stumbled across the following problem in high school:$$
x^2 + y^2 = n!
$$

I tested it within my laptop capabilities, watched a 3b1b video Pi in prime regularities, where he explains how to find the number of integer solutions based on prime factors. There doesn't seem to be any above $30!$. Maybe I'm wrong and there are infinitely many exceptions like $2$ and $6$, maybe the proof is too difficult for me to grasp or… I hope I'm just too blind to see the obvious.

Best Answer

For $n\geq 7$, Erdős proved in 1932 that there is a prime $n/2<p\leq n$ of the form $p=4k+3$. From this he deduces (in the same paper) that $1!$, $2!$, $6!$ are the only factorials which can be written as a sum of two squares.

Related Question