Revised Question: How many different numbers between 1/1000 and 1000 can be written either as a power of 2 or as a power of 3, where the exponent is an integer?
2^9 = 512 So that is 9+9+1 = 19 powers of 2
3^6=729 so that is 6+6+1 = 13 powers of 3
Now you just have to work out how many are powers of 2 and 3 because they have been counted twice.
If they are powers of 2 and 3 that means they are powers of 6
6^3 = 216 which is the biggest so that is 3+1+3 = 9
So I think the answer is 19+13-9 = 23
It is a petty you are a guest and not a member as that means you will probably never realize this question has been answered.