Every prime divides some repunit
ProvedAlfutovaUstinov.problem_4_111elementary-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 the repunit with digits is
Theorem. Let be a prime number with and . Then some repunit is a multiple of : there exists with
The primes and are exactly the prime divisors of the base , and no repunit is divisible by them. The result is closely related to the fact that has a purely periodic decimal expansion for such .
Formalization Note The repunit is written as the finite sum (Finset.range k), and the number of digits 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 AlfutovaUstinovSource
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