Skip to main content
OlympiadHQ

Browse · MATH

Print

jmc

counting and probability intermediate

Problem

The numbers from 1 to 150, inclusive, are placed in a bag and a number is randomly selected from the bag. What is the probability it is neither a perfect square nor a perfect cube? Express your answer as a common fraction.
Solution
It is easier to count the number of integers from 1 to 150 that are perfect squares or perfect cubes. We see there are 12 perfect squares from 1 to 150, namely , and there are 5 perfect cubes, namely . Then notice there are two repetitions, and . So there is a total of integers from 1 to 150 that are perfect squares or perfect cubes. Thus, we get integers from 1 to 150 that are neither perfect squares nor perfect cubes. So the probability that we select such a number is .
Final answer
\frac{9}{10}