Trial division algorithm for testing divisibility and basic primality up to a bound

Class:
Algorithm