**Problem**: Suppose $p$ is a prime number and $p(p+1776)$ is a perfect square. Prove that $p\mid (p+1776)$.
From the assumption of the problem, $p(p+1776)=k^2$ for some positive integer $k$. This does not help much. _Intuitively_, one can write $p(p+1776)=p^2m^2$ for some integer $m$ due to the [fundamental theorem of arithmetic](https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic): in order to have a complete square, the factor $p$ should appear twice. One can then easily conclude that $p\mid (p+1776)$ since $p+1776=pm^2$. But I don't find a formal way to *show* this intuition.