All prime numbers (except 2) can be put into two categories: those that equal 4n + 1 and those that equal 4n – 1, where n equals some number. So 13 is in the former group (4 × 3 + 1), whereas 19 is in the latter group (4 × 5 – 1). Fermat’s prime theorem claimed that the first type of primes were always the sum of two squares (13 = 22 + 32), whereas the second type could never be written in this way.