r could be written as a sum of four squares.He devised a new method of factorising large numbers which he demonstrated by factorising the number 2027651281 = 44021 46061.He proved what has come to be known as Fermat's Little Theorem (to distinguish it from his so-called Last Theorem). This states that if p is a prime then for any integer a we have ap = a modulo p. This proves one half of what has been called the Chinese hypothesis which dates from about 2000 years earlier, that an integer n is prime if and only if the number 2n - 2 is divisible by n. The other half of this is false, since, for example, 2341 - 2 is divisible by 341 even though 341 = 31 11 is composite. Fermat's Little Theorem is the basis for many other results in Number Theory and is the basis for methods of checking whether numbers are prime which are still in use on today's electronic computers. Fermat corresponded with other mathematicians of his day and in particular with the monk Marin Mersenne. In one of his letters to Mersenne he conjectured that the numbers 2n + 1 were always prime if n is a power of 2. He had verified this for n = 1, 2, 4, 8 and 16 and he knew that if n were not a power of 2, the result failed. Numbers of this form are called Fermat numbers and it was not until more than 100 years later that Euler showed that the next case 232 + 1 = 4294967297 is divisible by 641 and so is not prime. Number of the form 2n - 1 also attracted attention because it is easy to show that if unless n is prime these number must be composite. These are often called Mersenne numbers Mn because Mersenne studied them. Not all numbers of the form 2n - 1 with n prime are prime. For example 211 - 1 = 2047 = 23 89 is composite, though this was first noted as late as 1536. For many years numbers of this form provided the largest known primes. The number M19 was proved to be prime by Cataldi in 1588 and this was the largest known prime for about 200 years until Euler proved t...