Project Euler 29 - Distinct powers

Official link:

Thought Process

Initialise a set (to remove duplicates), make a double loop through a and b and add a^b to the set, then I return the length of the set

Interactive Code

Input an odd integer (yourinput)

Code will output the number of distinct terms generated by a^b where 2 <= a, b <= yourinput