Skip to main content
OlympiadHQ

Browse · MATH

Print

jmc

counting and probability intermediate

Problem

An integer is randomly chosen from the integers 1 through 100, inclusive. What is the probability that the chosen integer is a perfect square or a perfect cube, but not both? Express your answer as a common fraction.
Solution
A number is a perfect square and a perfect cube if and only if it is a perfect sixth power. Note that and , while . Hence, there are 10 squares and 4 cubes between 1 and 100, inclusive. However, there are also 2 sixth powers, so when we add to count the number of squares and cubes, we count these sixth powers twice. However, we don't want to count these sixth powers at all, so we must subtract them twice. This gives us a total of different numbers that are perfect squares or perfect cubes, but not both. Thus, our probability is .
Final answer
\frac{1}{10}