Thue’s lemma
Let be a prime number of the form . Then there are two unique integers and with such that . Additionally, if a number can be written in as the sum of two squares in 2 different ways (i.e. and with the two sums being different), then the number is composite.