State the number of positive integers in the range of 1 to 'x' which are perfect squares or cubes or perfect fourth powers of an integer.
My try It would be helpful to find the square root of the nearest perfect square to x and hence know the number of perfect squares . Same could be done with cubes and perfect fourth powers.However , there are some numbers which are both or all three of them and hence would be repeated. E.g. - 1, 64 . Is there another approach to such a problem ?