Finding all numbers having factor power of 2 and 3 Using sieve
arr = [ False ] * ( n + 1 ) ; NEW_LINE two = 1 ; NEW_LINE three = 1 ; NEW_LINE while ( two + 1 < n ) : NEW_LINE INDENT arr [ two ] = True ; NEW_LINE while ( two * three + 1 < n ) : NEW_LINE INDENT arr [ three ] = True ; NEW_LINE arr [ two * three ] = True ; NEW_LINE three *= 3 ; NEW_LINE DEDENT three = 1 ; NEW_LINE two *= 2 ; NEW_LINE DEDENT