Find the number of positive integers not exceeding 1000 that are either the square or the cube of an integer
Question
Answer:
There are 10 perfect cubes between 1 and 1000 (namely cubes of 1-10)There are 31 perfect squares between 1 and 1000 (squares from 1-31)
Out of these, 3 perfect squares are also perfect cubes,
{1^2=1^3, 8^2=4^3, 27^2=9^3}.
By the law of inclusion/exclusion, the number of positive integers not exceeding 1000 that are either the square or the cube of an integer
=10+31-3
=38
solved
general
11 months ago
6807