# On proving $n = \sum_{d\mid n}\varphi(d)$

$\def\nset{\{1,\dots,n\}}$ I'm trying to work out my own proof1 of Euler's classic formula

$$n = \sum_{d\mid n}\varphi(d)\;.$$

I'm looking for some pointers to the standard terminology and/or notation, as spelled out in more detail below.

Let $\Phi(t)$ be the set of positive integers $s \leq t \in \def\dom{\mathrm{dom}}\dom(\varphi)$ such that $\gcd(s, t) = 1$. Hence, $|\Phi(t)| = \varphi(t)$. Also, let

$$u \, \Phi(t) := \{uv\mid v \in \Phi(t)\}\;.$$

Lastly, let $\Delta_t$ stand for the set of all positive divisors of $t \in \dom(\varphi)$. (With this notation, Euler's formula becomes $n = \sum_{d\in\Delta_n}\varphi(d)$.)

My proof strategy2 is to show that, for any positive integer $n$, the set $\nset$ can be partitioned into subsets of the form $d\,\Phi(n/d)$, where $d$ ranges over $\Delta_n$. Hence,

$$\{1,\dots,n\} = \bigcup_{d\in\Delta_n} d\,\Phi\left(\frac{n}{d}\right)\,,$$

where the sets in the union are pairwise-disjoint. Euler's formula is then a corollary of this result, since $|d\,\Phi(n/d)| = |\Phi(n/d)| = \varphi(n/d)$, and $\sum_{d\in\Delta_n}\varphi(n/d) = \sum_{d\in\Delta_n}\varphi(d)$.

My question is: is there standard nomenclature and/or notation for any of the items in this proof strategy? In particular, I'm most interested in standard nomenclature/notation for the following items:

• the set $\Phi(t)$;
• the set $\Delta_n$;
• any of the functions on $\Delta_n$ given by
• $d\mapsto \varphi(\frac{n}{d})$;
• $d\mapsto \Phi(\frac{n}{d})$;
• $d\mapsto d\,\Phi(\frac{n}{d})$;
• the decomposition $\bigcup_{d\in\Delta_n} d\,\Phi(\frac{n}{d})$.

OK, FWIW, here's the rest of the proof: $$\begin{array}{rclcrcl} m & \in & d\,\Phi\left(\frac{n}{d}\right) & \Leftrightarrow & \frac{m}{d} & \in & \Phi\left(\frac{n}{d}\right) \\ & & & \Leftrightarrow & 1 & = & \gcd\left(\frac{m}{d}, \frac{n}{d}\right) \\ & & & \Leftrightarrow & d & = & \gcd(m, n)\;. \end{array}$$

The $\Rightarrow$ implications above show that the subsets $d\, \Phi(n/d)$, as $d$ ranges over $\Delta_n$, are pairwise-disjoint.

Furthermore, since $\gcd(m, n) \in \Delta_n$, for all $m \in \nset$, it follows from the $\Leftarrow$ implications above that

$$\nset \subseteq \bigcup_{d\in\Delta_n} d\,\Phi(\frac{n}{d})\;.$$

On the other hand $\forall s \in \Phi(t)$, we have $1 \leq s \leq t$. It follows that

$$d \in \Delta_n \;\;\land\;\; m \in d \, \Phi(\frac{n}{d}) \;\;\Rightarrow\;\; 1 \leq d \leq m \leq n\;,$$

and, therefore,

$$\nset \supseteq \bigcup_{d\in\Delta_n} d\,\Phi(\frac{n}{d})\;,$$

which completes the proof.

1 I've read, and even "followed", a few proofs of this formula, but somehow it remains a bit mysterious/magical/mystifying to me: how could anyone have seen it? Of course, the standard answer to the last question is something like "by being Leonhard Euler, that's how!", which to me is useless. In working out a proof my aim is to find a more useful answer, to me at least.

2 I'm not claiming any originality here. If this strategy is at all correct, I'm sure I'm not the first one to think of it.

• Can't help you with the nomenclature, but: "If this strategy is at all correct" Aye, 'tis. Consider $\gcd(m,n)$. Commented Mar 16, 2014 at 0:34
• I think Euler's historical proof was the one Wikipedia calls concrete here, as I vaguely remember have read it. I'll try to find references. Commented Mar 16, 2014 at 0:35
• You might have seen somewhere the following rephrasing of the same proof: consider the $n$ fractions $\frac1n, \frac2n, \dots, \frac nn$. When reduced to lowest terms, exactly $\phi(d)$ of them have denominator $d$, for every $d$ dividing $n$. Commented Mar 16, 2014 at 1:08
• @GregMartin: I suppose that the proof I wrote above closely parallels the one you mention, but somehow I find it more natural and useful to partition the set of integers $\{1,\dots,n\}$ than to partition the set of fractions $\{\frac{1}{n},\dots,\frac{n}{n}\}$, even though both procedures are basically equivalent.
– kjo
Commented Mar 16, 2014 at 3:35
• That cyclotomic factorization is a consequence of a similar partitioning: the set of $n$th roots of unity into sets of primitive $d$th roots of unity for every $d$ dividing $n$. Commented Mar 16, 2014 at 7:37

Just a long comment; i do not see that wikipedia shows the most satisfactory proof, which is that the function $$f(n) = \sum_{d\mid n}\varphi(d)$$ has the property called "multiplicative" in number theory; that is, given integers $a,b > 0,$ we have $$\gcd(a,b) = 1 \; \; \Longrightarrow \; f(ab) = f(a) f(b).$$ This requires proof, of course, a worthy exercise. The next part is to verify your desired equation for primes and prime powers. So, given prime $p,$ what are $f(p)$ and $f(p^2),$ for example, and why?
Now that I think of it, given any multiplicative function $g(n),$ when we define $$h(n) = \sum_{d\mid n}g(d),$$ it follows that $h(n)$ is also multiplicative. That explains a lot.