How many numbers in the list $$1,2,3,...,2001$$ are perfect squares and perfect cubes of whole numbers?
My progress: Well I do know $$1,4,9,16,25,36,...$$ are perfect squares and $$1,8,27,64,...$$ are perfect cubes but I can't manage to get a formula/pattern to determine how many there are before 2001 without actually counting them.
$\endgroup$13 Answers
$\begingroup$If you want perfect squares and perfect cubes, the number needs to be a perfect what?
$\endgroup$2$\begingroup$For perfect squares, the number of perfect squares less than z is $\text{floor}(\sqrt{z})$ where $z$ in this case is 2001.
For perfect cubes, the number of perfect cubes less than z is $\text{floor}(z^{1/3})$.
I leave it to you to figure out why this works.
$\endgroup$$\begingroup$56 perfect squares and cubes before 2001.
Squares:1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, and 1936.
Cubes: 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, and 1728.
44 squares and 12 cubes.
Numbers with both perfect squares and cubes in common : 1, (1^2 and 1^3) 64, (8^2 and 4^3) and 729 (27^2 and 9^3)
3 total. 1, 64, 729
$\endgroup$