Lecture 24

Problems and Puzzles
involving Primes


  1. Problems and Puzzles from primepuzzles.net
  2. Prime Links ++ Links related to Prime Numbers
  3. Formulas for Primes! as well as a formula for the nth prime number!
  4. More Links to Primes
  5. primo prime verification software, from ellipsa.net
  6. GIMPS the Great Internet Mersenne Prime Search (sort of Seti for primes!)
  7. Maple (the symbolic software package) has some functions involving primes.
    1. isprime: primality test

      Calling Sequence: isprime(n)

      Parameters: n - integer

      Description

      • The function isprime is a probabilistic primality testing routine.

      • It returns false if n is shown to be composite within one strong pseudo-primality test and one Lucas test and returns true otherwise. If isprime returns true, n is ``very probably'' prime - see Knuth ``The art of computer programming'', Vol 2, 2nd edition, Section 4.5.4, Algorithm P for a reference and H. Riesel, ``Prime numbers and computer methods for factorization''. No counter example is known and it has been conjectured that such a counter example must be hundreds of digits long.

    2. nextprime: determine the next largest prime

      prevprime: determine the next smallest prime

      Calling Sequence:

      • nextprime(n)
      • prevprime(n)

      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.

    3. ithprime: determine the ith prime number

      Calling Sequence: ithprime(i)

      Parameters: i = positive integer

      Description: The ithprime function returns the ith prime number, where the first prime number is 2.

  • Fermat's Little Theorem in Maple Worksheet (html) format