3

I have seen an explanation of the identification of Euler's Totient function with a product of terms $\psi(n) = n \prod_{p|n} (1 - 1/p)$ where the $p$'s are prime numbers dividing $n$.

"Imagine the integers $0, 1, ... n-1$ . These are the candidates of the prime divisors of $n$. Now choose some prime number $p$, which eliminates $1/p$ of these candidates. Then you have $n(1-1/p)$ of these candidates left. Then choose a different prime $q$ which cancels out $1/q$ of the remaining candidates to give $n(1-1/p)(1-1/q)$, and so on."

This was presented as a proof, but I had some objections. Now for the first step, it's easy to see due to the structure of the integers, that every $p$th integer is divisible by $p$. But after we eliminate these candidates, we somewhat ruin the structure of the integers so that we can no longer say that every $q$th remaining candidate is divisible by $q$. Is the proof salvagable?

This proof appears in Computational Complexity by Christos H. Papadimitriou pg 224 as Lemma 10.1

Mark
  • 5,696

1 Answers1

2

After some thought, I have realized a combinatorial proof different from the ones mentioned in the comments that use Chinese Remainder Theorem.

Let's say we are computing $\phi(n)$ and the prime divisors of $n$ are $p_1, ..., p_k$. Now consider the sets $A_r$, the multiples of $r$ inside the integers $\{0, 1, 2, ..., n-1\}$. The size of $A_r$ for any divisor $r$ of $n$ is exactly $|A_r| = n/r$. Also note that $A_r \cap A_s = A_{rs}$

The integers less than $n$ which share a factor in common with $n$ are exactly described by the set $\cup_{p \in P} A_p$ where $P$ are the prime divisors of $n$. Therefore, $\phi(n) = n - |\cup_{p \in P} A_p|$.

By the principle of inclusion-exclusion, we have:
$|\cup_{p \in P} A_p| = \sum_{p \in P}|A_p| - \sum_{p,q \in P^2, p\lt q}|A_p\cap A_q| + \sum_{p,q,r \in P^3, p \lt q \lt r} |A_p \cap A_q \cap A_r|$ - ...

$ = \sum_{p \in P}\frac{n}{p} - \sum_{p,q \in P^2, p\lt q}\frac{n}{pq} + \sum_{p,q,r \in P^3, p \lt q \lt r} \frac{n}{pqr} - ...$

So putting it all together:
$\phi(n) = n - \sum_{p \in P}\frac{n}{p} + \sum_{p,q \in P^2, p\lt q}\frac{n}{pq} - \sum_{p,q,r \in P^3, p \lt q \lt r} \frac{n}{pqr} + ...$
$\phi(n) = n(1- \sum_{p \in P}\frac{1}{p} + \sum_{p,q \in P^2, p\lt q}\frac{1}{pq} - \sum_{p,q,r \in P^3, p \lt q \lt r} \frac{1}{pqr} + ...)$

This of course can be factored into the form given in the original statement. Alternatively, if you expand the terms given in the original statement, you will find the result given above.

Mark
  • 5,696