as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
explain how to use the fermat's little theorem.
user
fermat's little theorem states that if p is a prime number, then for any integer a, the number a^p - a is an integer multiple of p (a^p = a (mod p)). this theorem can be used in cryptography today to test whether a given number is prime or not. in order to use fermat's little theorem, one must select a number a randomly and test whether a^(p-1) - 1 is divisible by p. if yes, then the given number is most likely prime.
assistant