How many integers from $1 \to 10^{10}$ are not perfect squares, cubes, or fifth powers?

1k Views Asked by At

How can I solve this question, using the Principle of Inclusion-Exclusion?

Count the number of integers in the range 1 to $10^{10}$ are not perfect squares, cubes, or fifth powers. That is, the integer cannot be written in the form $m^r$ where $m$ is an integer and $r$ is one of $2,3,5$.

2

There are 2 best solutions below

2
On

Compute the number of squares, cubes, and fifth powers. Now note that you have counted the sixth, tenth, and fifteenth powers twice each, so subtract them. You have counted the thirtieth powers three times and subtracted them three times, so add them once more.

0
On

$$n = 10^{10} - \left( \lfloor \sqrt{10^{10}} \rfloor + \lfloor \sqrt[3]{10^{10}} \rfloor + \lfloor \sqrt[6]{10^{10}} \rfloor - \lfloor \sqrt[6]{10^{10}} \rfloor - \lfloor \sqrt[15]{10^{10}} \rfloor - \lfloor \sqrt[10]{10^{10}} \rfloor + \lfloor \sqrt[30]{10^{10}} \rfloor \right) = 9,999,897,804$$