Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Finding Prime numbers – Sieve of Eratosthenes

314.1K views on YouTube

See complete series on maths problems here:

Sieve of Eratosthenes is a very famous and efficient algorithm to generate all small prime numbers up to around 1-10 million. This is an ancient algorithm given by a Greek mathematician named Eratosthenes. We will write a simple program for prime number generation using this algorithm.
Please go through our previous lesson to understand prime number testing using trial division method: http://www.youtube.com/watch?v=7VPA-HjjUmU
Wikipedia link for Sieve of eratosthenes: http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes