Added digit_power_sum function for problem 30.