Utility function to compute semi - primes in a range
function computeSemiPrime ( ) { for ( var i = 2 ; i < MAX ; i ++ ) { var cnt = 0 ; var num = i ; for ( var j = 2 ; cnt < 2 && j * j <= num ; ++ j ) { while ( num % j == 0 ) {