Fermat's little theorem is one of the most popular math theorems dealing with modular exponentiation. It has many generalizations, which you can evoke in more complicated calculations. We call it 'little' so as to distinguish it from its much more popular sibling, Fermat's last theorem. Read more