Math 2.0

Number theory Proof

Proof of the sum of the totient over the divisors

Builds on Euler's totient functionDivisibilityGreatest common divisorCoprime integersBézout's identity

Proof

We sort the integers 1,…,n1, \dots, n by their greatest common divisor with nn.

  1. Let nn be a positive integer. For each positive divisor dd of nn, let SdS_d be the set of integers kk with 1≤k≤n1 \le k \le n and gcd⁡(k,n)=n/d\gcd(k, n) = n / d.
  2. Let 1≤k≤n1 \le k \le n. The greatest common divisor g=gcd⁡(k,n)g = \gcd(k, n) is a positive divisor of nn. So d=n/gd = n / g is a positive divisor of nn, and k∈Sdk \in S_d.
  3. The sets SdS_d are pairwise disjoint, since n/dn / d determines dd. With step 2, they partition {1,…,n}\{ 1, \dots, n \}. So n=∑d∣n∣Sd∣n = \sum_{d \mid n} \abs{S_d}.
  4. Fix a positive divisor dd of nn, and let e=n/de = n / d, so n=edn = e d. We show that ∣Sd∣=φ(d)\abs{S_d} = \varphi(d), where φ\varphi is Euler's totient function.
  5. If k∈Sdk \in S_d, then e=gcd⁡(k,n)e = \gcd(k, n) divides kk. So k=ejk = e j for an integer jj, and 1≤k≤n1 \le k \le n gives 1≤j≤d1 \le j \le d.
  6. So it suffices to show, for 1≤j≤d1 \le j \le d, that gcd⁡(ej,ed)=e\gcd(e j, e d) = e if and only if gcd⁡(j,d)=1\gcd(j, d) = 1.
  7. Assume gcd⁡(j,d)=c>1\gcd(j, d) = c > 1. Then ece c divides eje j and ede d. So gcd⁡(ej,ed)≥ec>e\gcd(e j, e d) \ge e c > e.
  8. Assume gcd⁡(j,d)=1\gcd(j, d) = 1. By Bézout's identity, ju+dv=1j u + d v = 1 for some integers uu and vv. Then (ej)u+(ed)v=e(e j) u + (e d) v = e.
  9. So each common divisor of eje j and ede d divides ee, and is at most ee. Since ee is itself a common divisor, gcd⁡(ej,ed)=e\gcd(e j, e d) = e.
  10. By steps 5 to 9, k↦k/ek \mapsto k / e is a bijection from SdS_d onto the set of jj with 1≤j≤d1 \le j \le d and jj coprime to dd. That set has φ(d)\varphi(d) elements, so ∣Sd∣=φ(d)\abs{S_d} = \varphi(d).
  11. By steps 3 and 10, ∑d∣nφ(d)=n\sum_{d \mid n} \varphi(d) = n.

Idea

Group the numbers 1,…,n1, \dots, n by their gcd with nn. The numbers with gcd n/dn / d are n/dn / d times the numbers up to dd that are coprime to dd, so there are φ(d)\varphi(d) of them. Adding over all groups counts each of 1,…,n1, \dots, n once.

Reading path

To understand this page from the ground up, read these 24 pages in order. The foundations come first. The path takes the proofs Proof of Bézout's identity, Proof of the commutativity of addition by induction, Proof of strong induction from ordinary induction, Proof of the well-ordering principle from strong induction, Proof of the division algorithm.

Show the path as a graph
Definition by recursion, concept, no evidence levelDefinition by recursi…conceptDivisibility, definition, no evidence levelDivisibilitydefinitionMathematical induction, concept, no evidence levelMathematical inductionconceptNatural numbers, object, no evidence levelNatural numbersobjectPeano axioms, concept, no evidence levelPeano axiomsconceptGreatest common divisor, definition, no evidence levelGreatest common divis…definitionSuccessor function, definition, no evidence levelSuccessor functiondefinitionCoprime integers, definition, no evidence levelCoprime integersdefinitionAddition of natural numbers, definition, no evidence levelAddition of natural n…definitionThe successor function is injective, statement, no evidence levelThe successor functio…statementZero is not a successor, statement, no evidence levelZero is not a success…statementEuler's totient function, definition, no evidence levelEuler's totient funct…definitionProof of the commutativity of addition by induction, proof, no evidence levelProof of the commutat…proofOrder on the natural numbers, definition, no evidence levelOrder on the natural …definitionCommutativity of addition, statement, no evidence levelCommutativity of addi…statementProof of strong induction from ordinary induction, proof, no evidence levelProof of strong induc…proofStrong induction, statement, no evidence levelStrong inductionstatementProof of the well-ordering principle from strong induction, proof, no evidence levelProof of the well-ord…proofWell-ordering principle, statement, no evidence levelWell-ordering princip…statementProof of the division algorithm, proof, no evidence levelProof of the division…proofDivision algorithm, statement, no evidence levelDivision algorithmstatementProof of Bézout's identity, proof, no evidence levelProof of Bézout's ide…proofBézout's identity, statement, no evidence levelBézout's identitystatementProof of the sum of the totient over the divisors, proof, no evidence levelProof of the sum of t…proof
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Definition by recursion concept
  2. Divisibility definition
  3. Mathematical induction concept
  4. Natural numbers object
  5. Peano axioms concept
  6. Greatest common divisor definition
  7. Successor function definition
  8. Coprime integers definition
  9. Addition of natural numbers definition
  10. The successor function is injective statement
  11. Zero is not a successor statement
  12. Euler's totient function definition
  13. Proof of the commutativity of addition by induction proof
  14. Order on the natural numbers definition
  15. Commutativity of addition statement
  16. Proof of strong induction from ordinary induction proof
  17. Strong induction statement
  18. Proof of the well-ordering principle from strong induction proof
  19. Well-ordering principle statement
  20. Proof of the division algorithm proof
  21. Division algorithm statement
  22. Proof of Bézout's identity proof
  23. Bézout's identity statement
  24. Proof of the sum of the totient over the divisors proof

Where this leads

8 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Euler%27s_totient_function, Divisor sum
About this page
Tag32JRQJ5MKN
URIm2://32JRQJ5MKN
Kindproof
WritingW0 stub
MSC11A25
ProvesSum of the totient over the divisors
UsesEuler's totient function, Divisibility, Greatest common divisor, Coprime integers, Bézout's identity
MethodsDirect proof
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.