Section 4. Primality testing.
Here I only remark that the modern study of primality testing really begins with the trail blaising work of Lucas, via Fermat's little theorem, and I urge any serious reader to rush to their bookdealer and obtain a copy of the wonderful book by Hugh C. Williams (details in the Section 8 bibliography).
I have briefly hinted at the sort of use that can be made of Fermat's little theorem to establish that a number is
composite
, but a great deal more is involved in using it as a
starting point
in proving that a number is
prime
.
I refer the interested reader to my web site, where I have
many
Maple worksheets - in the 2nd and 3rd year, and Public and Other Lectures sections of my site's Maple section - devoted to primality testing.