In his letter to Frenicle, dated 18th October, 1640, Fermat states the following (Point 8, translated) :
If you subtract $2$ from a square, the remaining value cannot be divided by a prime which is greater than a square by $2$
For example, take for a square $1,000,000$, from which, subtracted by two, remains $999,998$. I say that the given remainder cannot be divided by $11$ or by $83$, by $227$, and so on.
You can prove the same rule for odd squares and, if I wanted, I would give you the lovely and general rule; but I'm content with having only indicated it to you.
In other words, numbers of the form $x^2 -2$ are not divisible by primes of the form $a^2 + 2$, where $x$ and $a$ are integers.
Questions :
$1)$ What is the general rule Fermat is talking about?
$2)$ Are there any modern references to this problem?
$3)$ How would Fermat have proved it?