def factorize(num):
    """ Provide prime number factors for integer num
    :returns: dictionary of prime factors (keys) & power for each (data)
    """
    factors = {}
    orig = num
    i, sqi = 2, 4
    while sqi <= num:
        while not num % i:
            num /= i
            factors[i] = factors.get(i, 0) + 1
        sqi += 2 * i + 1
        i += 1
    if num != 1 and num != orig:
        factors[num] = factors.get(num, 0) + 1
    if factors:
        return factors
    else:
        return {num: 1}
