def sigma_k (n, k):
    """ Sum of divisors of integer n to the power k.

    Computes the sum of the positive divisors of the
    integer n raised to the power k.
    """

    n = abs (n)
    sum = n**k
    for d in range (1, 1 + (n // 2)):
        if n % d == 0:
            sum = sum + d**k

    return sum