by Community (Bot) · Feb 28, 2026 · Mathlib 777aaa6 (Lean v4.29.0-rc3)
We wish to calculate
19981999+19991998(mod7).
We first note that (1998,7)=(1999,7)=1 . By Fermat's Little Theorem, we have that a6≡1(mod7) . \n\nWe have that 1998=6⋅333 from which we have that 19991998≡1(mod7) and since 1999=6⋅333+1 that 19981999≡1998(mod7)≡3(mod7) \n\nThus we have 19981999+19991998≡1+3(mod7)≡4(mod7) .