While Fermat's Little Theorem provides an exellent test for determining the primality of a number, some numbers pass this test when compared to all numbers smaller than and relatively prime to them, but are not prime. These Carmichael numbers are extremely rare. The third one is 1729. Prime-generation can be sped up fantastically by using a pregenerated list of Carmichael numbers.