Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Values of Euler\'s function: φ(17)\varphi(17)φ(17), φ(p)\varphi(p)φ(p), φ(p2)\varphi(p^2)φ(p2), φ(pα)\varphi(p^\alpha)φ(pα)

Proved
AlfutovaUstinov.problem_4_132

by evgeth · Sep 28, 2026 · Mathlib 0df444a (Lean v4.33.1)

elementary-number-theoryeuler-totientnumber-theory

This is Problem 4.132 of N. B. Alfutova and A. V. Ustinov, Algebra and Number Theory (MCCME, 2002), Chapter 4, §4 “Theorems of Fermat and Euler”.

Euler's function φ(n)\varphi(n)φ(n) is the number of integers among 1,2,…,n1,2,\dots,n1,2,…,n that are coprime to nnn. The problem asks for (a) φ(17)\varphi(17)φ(17), (b) φ(p)\varphi(p)φ(p), (c) φ(p2)\varphi(p^2)φ(p2), (d) φ(pα)\varphi(p^{\alpha})φ(pα), where ppp is a prime and α≥1\alpha\ge 1α≥1 is a natural number.

Theorem. For every prime ppp and every integer α≥1\alpha\ge1α≥1:

  1. φ(17)=16\varphi(17)=16φ(17)=16;
  2. φ(p)=p−1\varphi(p)=p-1φ(p)=p−1;
  3. φ(p2)=p(p−1)\varphi(p^{2})=p(p-1)φ(p2)=p(p−1);
φ(pα)=pα−1(p−1).\varphi(p^{\alpha})=p^{\alpha-1}(p-1).φ(pα)=pα−1(p−1).

These values, together with multiplicativity, give the standard product formula for Euler's function.

Formalization Note Euler's function is Mathlib's Nat.totient, which counts the k∈{0,…,n−1}k\in\{0,\dots,n-1\}k∈{0,…,n−1} with gcd⁡(k,n)=1\gcd(k,n)=1gcd(k,n)=1; for n≥1n\ge1n≥1 this agrees with the book's definition. The subtractions p−1p-1p−1 and α−1\alpha-1α−1 are natural-number subtractions, exact because p≥2p\ge 2p≥2 and α≥1\alpha\ge 1α≥1.

Preamble
import Mathlib
Formal statement
namespace AlfutovaUstinov

theorem problem_4_132 (p : ℕ) (hp : p.Prime) (α : ℕ) (hα : 0 < α) :
    Nat.totient 17 = 16 ∧ Nat.totient p = p - 1 ∧ Nat.totient (p ^ 2) = p * (p - 1) ∧
      Nat.totient (p ^ α) = p ^ (α - 1) * (p - 1) := by sorry

end AlfutovaUstinov
Source
N. B. Alfutova, A. V. Ustinov, «Алгебра и теория чисел. Сборник задач для математических школ» (Algebra and Number Theory: a problem book for mathematical schools), Moscow: MCCME, 2002, Chapter 4 «Арифметика остатков» (Arithmetic of residues), §4 «Теоремы Ферма и Эйлера» (Theorems of Fermat and Euler), Problem 4.132. Problem text and answer as catalogued on problems.ru, problem 60758: https://problems.ru/view_problem_details_new.php?id=60758

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me