Added fermat's little theorem implementation