Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Every prime p≠2,5p\ne 2,5p=2,5 divides some repunit 11…111\ldots111…1

Proved
AlfutovaUstinov.problem_4_111

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

elementary-number-theoryfermat-little-theoremnumber-theoryrepunits

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

A repunit is a natural number whose decimal representation consists of ones only. For k≥1k\ge 1k≥1 the repunit with kkk digits is

Rk=11…1⏟k digits=∑i=0k−110i.R_k=\underbrace{11\ldots1}_{k\ \text{digits}}=\sum_{i=0}^{k-1}10^{i}.Rk​=k digits11…1​​=i=0∑k−1​10i.

Theorem. Let ppp be a prime number with p≠2p\ne 2p=2 and p≠5p\ne 5p=5. Then some repunit is a multiple of ppp: there exists k≥1k\ge 1k≥1 with

p∣∑i=0k−110i.p \mid \sum_{i=0}^{k-1}10^{i}.p∣i=0∑k−1​10i.

The primes 222 and 555 are exactly the prime divisors of the base 101010, and no repunit is divisible by them. The result is closely related to the fact that 1/p1/p1/p has a purely periodic decimal expansion for such ppp.

Formalization Note The repunit RkR_kRk​ is written as the finite sum ∑i∈{0,…,k−1}10i\sum_{i\in\{0,\dots,k-1\}}10^i∑i∈{0,…,k−1}​10i (Finset.range k), and the number of digits kkk is required to be positive.

Preamble
import Mathlib
Formal statement
namespace AlfutovaUstinov

theorem problem_4_111 (p : ℕ) (hp : p.Prime) (h2 : p ≠ 2) (h5 : p ≠ 5) :
    ∃ k : ℕ, 0 < k ∧ p ∣ ∑ i ∈ Finset.range k, 10 ^ i := 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.111. Problem text and answer as catalogued on problems.ru, problem 60737: https://problems.ru/view_problem_details_new.php?id=60737

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