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

67 Views Asked by At

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

2

There are 2 best solutions below

0
On BEST ANSWER
  • 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$.
0
On

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.