How to use totient function here?

36 Views Asked by At

I have asked this before, but I had no idea how to use Totient, now I do here is the questions:

How many positive integers $< 2013$ cannot be divided by $2, 3, 5$ ??

An advice given was find $\phi(2010)$

I got that:

$2010 = 2 \cdot 3 \cdot 5 \cdot 67$

But then $\phi(2010)$ would give the positive integers $< 2010$ that do not divide $2, 3, 5, 67$ the $67$ is the problem.

How can I use Totient to eliminate number that dont be divided by $67$ but can be by $2, 3, 5$ ?

1

There are 1 best solutions below

1
On

No need to use $\phi$, simply apply inclusion/exclusion principle:

$2012-\lfloor\frac{2012}{2}\rfloor-\lfloor\frac{2012}{3}\rfloor-\lfloor\frac{2012}{5}\rfloor+\lfloor\frac{2012}{2\times3}\rfloor+\lfloor\frac{2012}{2\times5}\rfloor+\lfloor\frac{2012}{3\times5}\rfloor-\lfloor\frac{2012}{2\times3\times5}\rfloor$