Get all the primes in prime vector
for ( i = 3 ; i <= n ; i += 2 ) if ( ! check [ i ] ) prime . push ( i ) ; return ; } function countSetBits ( n ) { let count = 0 ; while ( n > 0 ) { count += n & 1 ; n >>= 1 ; } return count ; }