SearcharxivSearch

arXiv subjects

Ahmed Diab

Publications and source records attributed to Ahmed Diab.

2 recordsLinked to original sources

Development of sieve of Eratosthenes and sieve of Sundaram's proof

We make two algorithms that generate all prime numbers up to a given limit, they are a development of sieve of Eratosthenes algorithm, we use two formulas to achieve this development, where all the multiples of prime number 2 are eliminated in the first formula, and all the multiples of prime numbers 2 and 3 are eliminated in the second formula. Using the first algorithm we proof sieve of Sundaram's algorithm, then we improve it to be more efficient prime generating algorithm. We will show the difference in performance between all the algorithms we will make and sieve of Eratosthenes algorithm in terms of run time.

math.NT

Sequence elimination function and the formulas of prime numbers

We will derive a function that eliminates any sequence of equidistant numbers from the integer numbers, then we will derive its inverse. Then we will use the Sequence elimination function to eliminate the multiples of the prime numbers from the integer numbers to produce formulas that generate all prime numbers in some interval.

math.NT