Added Fermat Prime Test

Added a basic fermat prime test.