 Although Euler began by disproving one of Fermat's conjectures, his later work moved Fermat's lesser theorem to a key place in number theory. In 1736, Euler proved a restricted form, and while most of us can read Latin, the type may be hard to read, so here's what it actually says. Suppose P is prime and P does not divide A, then P divides A to P minus 1 minus 1. Euler's proof is by induction. The proof is so obscure that it's periodically rediscovered by mathematicians great and insignificant. In 1747, Euler published theorems regarding the divisors of numbers which prove Fermat's theorem a second time. The induction proof is a little cleaner, but the method is essentially the same. However, this second proof is noteworthy because Euler also gave insight into how he found the factorization of 2 to 2 to the fifth plus 1. From Fermat's theorem, we can conclude that if P does not divide A or B, it must divide A to the P minus 1 minus B to the P minus 1. Again, by assumption P does not divide A, so it must divide A to the P minus 1 minus 1, that's Fermat's theorem. Similarly, it must also divide B to the P minus 1 minus 1, so it must divide their difference. Euler then proved that the sum of squares cannot be divisible by primes of the form 4n minus 1 unless both A and B are so divisible. And that's a nicely algebraic proof. Suppose 4n minus 1 is prime and not a divisor of A or B, then by the preceding we know the difference of their 4n minus 2th powers is going to be divisible by 4n minus 1. Consequently, the sum cannot be divisible by 4n minus 1, since if we add the two expressions, we'd get 2A to the 4n minus 2, which would have to be divisible by 4n minus 1. Now, since 4n minus 2 is 2 times 2n minus 1 and 2n minus 1 is odd, then we can factor, and so no prime of the form 4n minus 1 can be a factor of A squared plus B squared. Consequently, the sum of squares can only be divisible by primes of the form 4n plus 1 and 2, which is an odd prime. Next, Euler proved that the sum of 4th powers could only be divisible by primes of the form 8n plus 1. Since 8 to the 4th plus B to the 4th is also the sum of squares, we know that its only prime factors are of the form 4k plus 1 or maybe 2. But these numbers are either 8n plus 1 or 8n minus 3 numbers. Now, if a prime has form 8n minus 3, then it's got to divide the difference, but not the sum, and as before, the latter has a factor of A to the 4th plus B to the 4th, so 8n minus 3 can't divide it. And similarly, A to the 8th plus B to the 8th can only be divisible by primes of the form 16n plus 1, and Lather rins repeat to give us a main result. The prime divisors must be of this form. So let's look at those Fermat primes again. Any prime divisor of this 5th Fermat number must be of the form 64k plus 1. And we can list the first few such numbers, but of these, only a couple are prime. So if this number does have a prime factor, it's got to be among a very short list, and in fact only four trial divisions are necessary to show that the number is composite.