check for all the possible numbers that can divide it
for ( $ i = 3 ; $ i <= sqrt ( $ n ) ; $ i += 2 ) { $ count = 0 ; while ( $ n % $ i == 0 ) { $ count ++ ; $ n = $ n / $ i ; } if ( $ count ) echo ( $ i . " ▁ " . $ count ) ; }