problem 16, summing digits of powers