How can I calculate the number of perfect cubes among the first $4000$ positive integers?

If you live in the world of base-2 geekdom, simply note that $2^{12}$ a.k.a. $16^3$ is 4K, or 4096. This is obviously too large. The barest mental math estimation will verify that $15^3 < 4000$. Done.


You could find the largest cube $\le 4000$.

$\sqrt[3]{4000} \approx 15.9$, so there are $15$ perfect cubes among the first $4000$ positive integers.


If you didn't have a calculator and needed to work out what the largest integer $x$ was such that $x^3\leq4000$ without just computing $\sqrt[3]{4000}$, then you could estimate it - $10^3=1000$, $20^3=8000$ so $10<x<20$. Then keep narrowing it down, e.g. go halfway $15^3=225\cdot15=2250+1125=3375$, and $16^3=256\cdot16=2560+1536>4000$.

So there are $15$.