Math 2.0

Number theory Proof

Proof of the formula for the totient of a prime power

Builds on Euler's totient functionPrime numberGreatest common divisorCoprime integersDivisibilityExistence of a prime divisorEuclid's lemma

Proof

  1. Let pp be a prime number and let kk be a positive integer. By definition, Euler's totient function φ(pk)\varphi(p^k) is the number of integers xx with 1≤x≤pk1 \le x \le p^k that are coprime to pkp^k.
  2. We show that an integer xx is coprime to pkp^k if and only if pp does not divide xx.
  3. Assume p∣xp \mid x. Since k≥1k \ge 1, pp also divides pkp^k. So pp is a common divisor, and gcd⁡(x,pk)≥p>1\gcd(x, p^k) \ge p > 1.
  4. Assume p∤xp \nmid x, and let d=gcd⁡(x,pk)d = \gcd(x, p^k) be the greatest common divisor. Since pk≠0p^k \ne 0, dd is positive. Suppose that d>1d > 1.
  5. By the existence of a prime divisor, there is a prime qq with q∣dq \mid d. Then qq divides pk=p⋅p⋯pp^k = p \cdot p \cdots p.
  6. By Euclid's lemma, applied to the kk factors in turn, qq divides pp. Since q>1q > 1 and pp is prime, q=pq = p.
  7. Then p=qp = q divides dd, and dd divides xx, so p∣xp \mid x. This contradicts step 4. So d=1d = 1.
  8. By steps 3 and 7, the integers in {1,…,pk}\{ 1, \dots, p^k \} that are not coprime to pkp^k are exactly the multiples of pp in this set.
  9. These multiples are pjp j with 1≤j≤pk−11 \le j \le p^{k-1}, since 1≤pj≤pk1 \le p j \le p^k is equivalent to 1≤j≤pk−11 \le j \le p^{k-1} for an integer jj. So there are pk−1p^{k-1} of them.
  10. Hence φ(pk)=pk−pk−1=pk−1(p−1)\varphi(p^k) = p^k - p^{k-1} = p^{k-1} (p - 1).

Idea

The only prime factor of pkp^k is pp, so a number shares a factor with pkp^k exactly when pp divides it. Among 1,…,pk1, \dots, p^k, every pp-th number is a multiple of pp, so we remove pk−1p^{k-1} of them.

Reading path

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

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…definitionPrime number, definition, no evidence levelPrime numberdefinitionSuccessor 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…proofProof of the existence of a prime divisor, proof, no evidence levelProof of the existenc…proofDivision algorithm, statement, no evidence levelDivision algorithmstatementExistence of a prime divisor, statement, no evidence levelExistence of a prime …statementProof 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 generalized Euclid's lemma, proof, no evidence levelProof of the generali…proofGeneralized Euclid's lemma, statement, no evidence levelGeneralized Euclid's …statementProof of Euclid's lemma, proof, no evidence levelProof of Euclid's lem…proofEuclid's lemma, statement, no evidence levelEuclid's lemmastatementProof of the formula for the totient of a prime power, proof, no evidence levelProof of the formula …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. Prime number definition
  8. Successor function definition
  9. Coprime integers definition
  10. Addition of natural numbers definition
  11. The successor function is injective statement
  12. Zero is not a successor statement
  13. Euler's totient function definition
  14. Proof of the commutativity of addition by induction proof
  15. Order on the natural numbers definition
  16. Commutativity of addition statement
  17. Proof of strong induction from ordinary induction proof
  18. Strong induction statement
  19. Proof of the well-ordering principle from strong induction proof
  20. Well-ordering principle statement
  21. Proof of the division algorithm proof
  22. Proof of the existence of a prime divisor proof
  23. Division algorithm statement
  24. Existence of a prime divisor statement
  25. Proof of Bézout's identity proof
  26. Bézout's identity statement
  27. Proof of the generalized Euclid's lemma proof
  28. Generalized Euclid's lemma statement
  29. Proof of Euclid's lemma proof
  30. Euclid's lemma statement
  31. Proof of the formula for the totient of a prime power proof

Where this leads

5 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Euler%27s_totient_function, Value of phi for a prime power argument
About this page
TagVCN0MCW84M
URIm2://VCN0MCW84M
Kindproof
WritingW0 stub
MSC11A25
ProvesTotient of a prime power
UsesEuler's totient function, Prime number, Greatest common divisor, Coprime integers, Divisibility, Existence of a prime divisor, Euclid's lemma
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.