Functions to test whether a number is prime and generate the prime numbers within a specified range. Based around an implementation of Wilson's theorem for testing for an integer's primality.