Sieve of Eratosthenes is an iOS application that implements the Sieve of Eratosthenes Algorithm to help the user in finding all the prime numbers up to a specific limit.
iOS, Swift, Objective-C
Eratosthenes was the third librarian of the famous library in Alexandria and an outstanding scholar all around. He is remembered by his measurement of the circumference of the Earth, estimates of the distances to the sun and the moon, and, in mathematics, for the invention of an algorithm for collecting prime numbers. The algorithm is known as the Sieve of Eratosthenes
The Sieve of Eratosthenes, one of a number of prime numbers sieves, is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e not prime) the multiples of each prime, starting with the multiples of 2.
The number of a given prime are generated as a sequence of numbers starting from that prime, with constant difference between them that is equal to that prime. This is the sieve's key distinction from using trial division to sequentially test each candidate number for divisibility by each prime.
The Sieve of Eratosthenes is one of the most efficient ways to find all of the smaller primes. It is named after Eratosthenes of Cyrene, a Greek mathematician; although none of his works has survived, the sieve was described and attributed to Eratosthenes in the Introduction of Arithmetic by Nicomachus.
Here's a walkthrough of Implementation of the Sieve of Eratosthenes in the application:
GIF created with [LiceCap] (http://www.cockos.com/licecap/).
Get started by cloning the project to your local machine: https://github.com/akashungarala/Sieve-of-Eratosthenes