Find all primes with Sieve of Sundaram

Sieve of Sundaram is an efficient algorithm used to find all the prime numbers till a specific number say N. This algorithm was discovered by Indian mathematician S. P. Sundaram in 1934. It performs better than popular methods like Sieve of Eratosthenes for smaller values till 5000.


This is a companion discussion topic for the original entry at http://iq.opengenus.org/sieve-of-sundaram/