In general Sieve of Sundaram , produces primes smaller than ( 2 * x + 2 ) for a number given number x . Since we want primes smaller than n , we reduce n to half
nNew = int ( ( n - 1 ) / 2 ) ; NEW_LINE