Prime Numbers and Sieve of Eratosthenes
A prime number is an integer n > 1 which is only divisible by 1 and n(itself). For example, 2, 3, 5 are prime numbers, but 6, 8, 9 are not prime numbers.
Every integer n > 1 can be uniquely expressed as the product of prime numbers…