Problems and Puzzles
involving Primes
Calling Sequence: isprime(n)
Parameters: n - integer
Description
prevprime: determine the next smallest prime
Calling Sequence:
Parameters: n = integer
Description: The nextprime function returns the smallest prime that is larger than n. The prevprime function returns the largest prime that is less than n.
Calling Sequence: ithprime(i)
Parameters: i = positive integer
Description: The ithprime function returns the ith prime number, where the first prime number is 2.