Project Euler #29: Distinct powers