29. Distinct powers Question How many distinct terms are in the sequence generated by for 2 ≤ a ≤ 100 and 2 ≤ b ≤ 100? Solution def p29(N = 100): return len(set(a ** b for a in range(2, N + 1) for b in range(2, N + 1))) Answer 9183