We have made array till 2 * n + 1 so that we can check prime number till that and conclude about sophie german prime .
prime = [ True ] * ( 2 * n + 1 ) NEW_LINE sieve ( 2 * n + 1 , prime ) NEW_LINE for i in range ( 2 , n + 1 ) : NEW_LINE