Loop to store every unique prime number
for ( i = 0 ; i < d ; i ++ ) { var x = b [ i ] ; while ( x != 1 ) { x = parseInt ( x / spf [ x ] ) ; if ( ! m . has ( spf [ x ] ) ) { m . set ( spf [ x ] , 1 ) ; } } }