 
Summary: Primality Tests Based on Fermat's Little
Theorem
Manindra Agrawal
Department of Computer Science
Indian Institute of Technology, Kanpur
manindra@iitk.ac.in
Abstract. In this survey, we describe three algorithms for testing pri
mality of numbers that use Fermat's Little Theorem.
1 Introduction
Pierre de Fermat, a 17th century mathematician, is famous for the Fermat's Last
Theorem:
Theorem (Fermat's Last Theorem) For any number n > 2, there is no
integer solution of the equation xn
+ yn
= zn
.
Fermat did not give a proof of this theorem and it remained a conjecture for
more than three hundred years. The quest for a proof of this theorem resulted in
the development of several branches of mathematics. The eventual proof of the
theorem is more than a hundred pages long [6]. A less well known contribution
