Skip to main content
OlympiadHQ

Browse · MATH

Print

jmc

number theory intermediate

Problem

How many positive integers less than are either a perfect cube or a perfect square?
Solution
The largest perfect square less than is . Therefore, there are perfect squares less than . The largest perfect cube less than is . Therefore, there are perfect cubes less than . However, we cannot simply add those two numbers together because there are numbers that are both a perfect cube and a perfect square. For a number to be both a perfect square and perfect cube, it needs to be a th power. The largest 6th power less than is , so there are 6th powers less than . Therefore, there are integers that are either a perfect cube or perfect square.
Final answer
29