Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Remainders of 51025^{102}5102 and 31043^{104}3104 upon division by 103103103

Proved
AlfutovaUstinov.problem_4_118

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

computationelementary-number-theoryfermat-little-theoremnumber-theory

This is Problem 4.118 of N. B. Alfutova and A. V. Ustinov, Algebra and Number Theory (MCCME, 2002), Chapter 4, §4 “Theorems of Fermat and Euler”. The problem asks for the remainders upon division by 103103103 of the numbers (a) 51025^{102}5102 and (b) 31043^{104}3104. The book's answers are 111 and 999.

Theorem.

5102 mod 103=1,3104 mod 103=9.5^{102} \bmod 103 = 1, \qquad 3^{104} \bmod 103 = 9 .5102mod103=1,3104mod103=9.

Since 103103103 is prime, the exercise illustrates Fermat's little theorem a102≡1(mod103)a^{102}\equiv 1 \pmod{103}a102≡1(mod103) for 103∤a103\nmid a103∤a.

Formalization Note The remainders are computed with natural-number division with remainder (%) on N\mathbb NN.

Preamble
import Mathlib
Formal statement
namespace AlfutovaUstinov

theorem problem_4_118 : 5 ^ 102 % 103 = 1 ∧ 3 ^ 104 % 103 = 9 := 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.118. Problem text and answer as catalogued on problems.ru, problem 60744: https://problems.ru/view_problem_details_new.php?id=60744

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