Most famous for FermatsLastTheorem, but also known for his "little" theorem, which says that
This was generalised by Euler to
which is the basis of the RSA cryptosystem.
Work by Fermat is also said to have inspired IsaacNewton in his invention of calculus.