Let $p/q<1$ and $p+q=333$. Show that the number of fractions where $p$ and $q$ has no common factor is $108$.
This is what I’ve worked out: $333/2 = 166.5$, and since $p<q$,
$p\leq 166, $ $q \geq 167$
So the total number of fractions is $166$.
But I don’t know how to find the number of fractions where $p$ and $q$ has no common factor without listing them all out.
$$333=3^2\cdot37.$$ Thus, by your work it's $$166-\left[\frac{166}{3}\right]-\left[\frac{166}{37}\right]+1=108.$$