problem 16: power digit sum