taking exponent 2
1-300 we have 1^2-17^2
taking exponent 3
1-300 we have 1^3-6^3
taking exponent 4
1-300 we have 1^4-4^4
taking exponent 5
1-300 we have 1^5-3^5
taking exponent 6
1-300 we have 1^6 and 2^6
taking exponent 7
1-300 we have 1^7 and 2^7
taking exponent 8
1-300 we have 1^8 and 2^8 only
taking exponent 7
1-300 we have only 1^9 remaining so here we stop
total number of terms are 17+6+4+3+2+2+2+1=37
NOW we have to subtract the common terms
1 is repeated in all 8 hence we subtract 8 from 37 and add just one one so it becomes 30
in squares we have 2^2 4^2 8^2 and 16^2 included as 4^2=2^4 it is included in raised to 4 list, 8^2 in raised to 6 list
and 16^2 in raised to 8 list
hence we subtract 3 from 30
again same way in squares list we have 3^2 and 9^2 we remove 9^2 as it is included as 3^4 in raised to four list
hence we subtract total (3+1) from 30 giving us 26 left
now in cubes list we have 2^3 and 4^3 we hence remove 4^3 as it is in raised to 6 list (2^6)
hence we subtract 1 from 26 giving us 25 left
i raised to 4 list we have both 2^4 and 4^4=2^8
hence again 25-1=24 left
in raised to 5 , 6 , 7 , and 8 list all numbers are unique so we dont remove anything
hence probability = 24/300=2/25