Let 2,3,5,6,7,10,11,... be an increasing sequence of positive integers that are neither the perfect squares nor the cubes. Find the 1991st term.
Let's define $\displaystyle f(n) $ to be the number of numbers less than or equal to $\displaystyle n $ such that they are neither the perfect squares or cubes.
We then have $\displaystyle \displaystyle f(n) = n - \lfloor \sqrt{n}\rfloor - \lfloor \sqrt[3]{n}\rfloor + \lfloor \sqrt[6]{n}\rfloor $.
The intuition behind $\displaystyle f(n) $ is we take every number up to $\displaystyle n $ and then subtract all of the perfect squares and cubes. We must then account for any duplicates.
Now solve $\displaystyle f(n) = 1991 $.