If the number is divisible by i , then insert it
if ( n % i == 0 ) { s . add ( Math . floor ( n / i ) ) ; s . add ( i ) ; while ( m % i == 0 ) m = Math . floor ( m / i ) ; } } if ( m > 1 ) s . add ( m ) ; let l = Array . from ( s ) ; l . sort ( function ( a , b ) { return a - b ; } ) ; l . reverse ( ) ;