# Number of perfect cubes n, $\in 1\leq{n}\leq{a}$, $a\in{Z^+}$ that aren't divisible by 3.

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

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