TITLE: The general proposition of Fermat
QUESTION [13 upvotes]: 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?

REPLY [3 votes]: Ad 3): If $p = a^2 + 2$ divides $x^2 - 2$, then $p$ divides $x^2 - 2 + p = x^2 + a^2$. But primes $p = 4n+3$ cannot divide sums of two squares without dividing the squares themselves. This observation is due to Weil.