Problem 29: Distinct powers