According to this link for the paper "A Brief History of Factoring and Primality Testing B. C. (Before Computers)", Cataldi created a method for primality testing which was verified by Fermat. The following is an excerpt from the paper:
In particular, his work "Trattato del modo brevissimo di trovar la radice quadra delli numeri"
published in 1613, represents a significant contribution to the development of continued fractions. His work on perfect numbers was also considerable. Among his thirty
20 MATH EMATICS MAGAZI N E
VOL. 75, NO. 1, FEBRUARY2002 21
books, he wrote on military applications of algebra, and even published an edition of
Euclid's Elements. Cataldi proved that the fifth, sixth, and seventh perfect numbers
It is uncertain whether Cataldi was the first to discover these
perfect numbers, but his are the first known proofs of these facts.
Cataldi was also the first to observe that if 2n _ 1 is prime then n
must be prime. In fact, the following result was known to Cataldi,
though proved by Fermat.
Long after Cataldi, Euler showed that every even perfect number has the form given
in Theorem 1. It is unknown whether there are any odd perfect numbers and the search
for them has exceeded the bound 10^300. Moreover, if such a beast exists, then it is
known that it must have at least twenty-nine (not necessarily distinct) prime factors
(see Guy [6, B l, p. 44]).
I hope this helps!