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

Is there any trick to solving such questions?

  • $\begingroup$ ^I did, thanks for reminding me. $\endgroup$ – Iti Shree Apr 29 '17 at 16:59

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$.

  • $\begingroup$ Yeah I can't use calculator, thanks. $\endgroup$ – Iti Shree Apr 25 '17 at 14:43
  • 3
    $\begingroup$ @ItiShree If you have any such restrictions (some method or tool is forbidden), please say so in the question. That helps others answer the question you actually have. Not all of the answerers guessed your intentions correctly. $\endgroup$ – Joonas Ilmavirta Apr 25 '17 at 21:41

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.

  • 11
    $\begingroup$ I think it's better to evaluate $15^3$ and $16^3$ and thus conclude there are $15$ perfect cubes among the first $4000$ - assuming no access to calculator. $\endgroup$ – mrnovice Apr 25 '17 at 14:40
  • $\begingroup$ @ItiShree You're welcome! $\endgroup$ – Ovi Apr 25 '17 at 14:44

Is there any trick to find such questions?

Google, I would suppose. I think you meant to say "to find the answers to such questions." And yes, there is, though to me it seems too elementary to call it a "trick." To the find how many perfect $k$-th powers there are among the first $n$ positive integers, you just have to compute $\lfloor \root k \of n \rfloor$. (Note that if $k$ is even, you don't strictly need to specify "positive," but your answer might be off by $1$ from the answer key if it's not clear whether $0^k$ is meant to be included.)

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

We see that $\root 3 \of {4000} \approx 15.874$, and then we verify that $15^3 = 3375 < 4000$ and $16^3 = 4096 > 4000$. Therefore the cubes you're looking for are $$1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728, 2197, 2744, 3375$$ (the first sixteen listed in Sloane's A000578, but with $0$ omitted).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.