2
$\begingroup$

As the question reads; How many perfect cubes n, $\in 1\leq{n}\leq{a}$, $a\in{Z^+}$ exist in terms of $a$ that aren't divisible by 3?
I'm looking for a formula in terms of $a$, to achieve this number. Trivially, the number of all perfect cubes less than a given $a$, will be $\lfloor{\sqrt[3]a}\rfloor$. But, what adjustment can be made to remove those that are multiples of $3$?

$\endgroup$
3
$\begingroup$
  • Number of perfect cubes between $1$ and $a$, is equal to $\lfloor \sqrt[3]a \rfloor$;
  • also the number of perfect cubes between $1$ and $a$ which are divisible by $3$, is equal to $\lfloor \dfrac{\sqrt[3]a}{3} \rfloor$;

so we can conclude that:

  • number of perfect cubes between $1$ and $a$ which are not divisible by $3$,
    is equal to $\lfloor \sqrt[3]a \rfloor - \lfloor \dfrac{\sqrt[3]a}{3} \rfloor$.
$\endgroup$
5
$\begingroup$

A perfect cube $m^3$ is a multiple of $3$ if and only if $m$ is a multiple of $3$. So determine how many multiples of $3$ there are from $1$ to $\lfloor \sqrt[3]a\rfloor$ and then substract.

$\endgroup$

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.