Prime Numbers

Introduction

A natural number is a positive whole number (1, 2, 3, etc.), sometimes with the inclusion of zero.

A prime number is a natural number that can only be divided by itself and 1 without remainders.

Project #1a

Create a program that uses the "Trial Division" described in the link below to display the first 100 prime numbers.

Let the user select the number of primes to find or select a number and find all of the prime number up to the number? Set a max limit?

Project #1b

Create a program that uses the "Sive of Eratosthenens" described in the link below to display the first 100 prime numbers.

Let the user select the number of primes to find or select a number and find all of the prime number up to the number? Set a max limit?

Project #1c

Create a program that uses the "Dijkstra's Approach" described in the link below to display the first 100 prime numbers.

Let the user select the number of primes to find or select a number and find all of the prime number up to the number? Set a max limit?

Project #2

Calculate and display each algorithm's performance statistics (time and space).

Also plot each algorithm's performance statistics (time and space). This will require you to use several sample sizes to get a plot line.

Links

Dijkstra's Hidden Prime Finding Algorithm (YouTube)