Wrote functions for modular exponentiation and Fermat's Little Theorem
Applied them to generating random prime number function