we can obtain the prime factorization of the number n n = ( p1 ^ k1 ) * ( p2 ^ k2 ) . . . ( pn ^ kn ) using the smallest_prime [ ] array , we keep dividing n by its smallest_prime until it becomes 1 , whilst we check if we have need to set k zero
while ( n > 1 ) : NEW_LINE INDENT n = n // p NEW_LINE k += 1 NEW_LINE if ( smallest_prime [ n ] != p ) : NEW_LINE DEDENT