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