Added algorithms script

Including Fermat's small theorem of testing for primeness