Let $p, q, r$ be three distinct primes. Show that $φ(n)=(p-1)(q-1)(r-1)$
So far I have:
There are $qr-1$ multiples of $p$ in $1,...,pqr$
There are $pr-1$ multiples of $q$ in $1,...,pqr$
There are $pq-1$ multiples of $r$ in $1,...,pqr$
We counted $pqr$ 3 times
$p$ & $q$ share $r-1$ multiples
$q$ & $r$ share $p-1$ multiples
$p$ & $r$ share $q-1$ multiples
Therefore, $φ(n)=pqr-(qr-1)-(pr-1)-(pq-1)+(r-1)+(p-1)+(q-1)-2$
Which does not simply down to $φ(n)=(p-1)(q-1)(r-1)$
What am I missing? Thanks for any help!
What you are missing is that it does simplify down to $(p-1)(q-1)(r-1)$:
\begin{align*} (p-1)(q-1)(r-1) &= pqr -qr-pr-pq+p+q+r-1\\ &=pqr-(qr-1)-(pr-1)-(pq-1) -3 \\ &\qquad +(p-1)+(q-1)+(r-1)+3 -1\\ &=pqr-(qr-1)-(pr-1)-(pq-1) \\ &\qquad+ (p-1)+(q-1)+(r-1) -1. \end{align*}