Update all multiples of p
for i in range ( p * 2 , n + 1 , p ) : NEW_LINE INDENT prime [ i ] = False ; NEW_LINE DEDENT p += 1 ; NEW_LINE j = 0 ; NEW_LINE for p in range ( 2 , n + 1 ) : NEW_LINE if ( prime [ p ] ) : NEW_LINE