Skip to content
The Lumenary

Practice · Early undergraduate

Congruences

Congruences

Warm-upHuman

Which of these statements are true? (Choose all that apply.)

Choose all that apply

Congruences

Warm-upHuman

What is the last digit of 320263^{2026}?

Congruences

CoreHuman

Find the inverse of 1717 modulo 4343: the x∈{1,…,42}x \in \{1, \dots, 42\} with 17x≡1(mod43)17x \equiv 1 \pmod{43}.

Congruences

CoreHuman

Find the smallest positive integer xx with x≡2(mod5)x \equiv 2 \pmod 5, x≡3(mod7)x \equiv 3 \pmod 7 and x≡4(mod9)x \equiv 4 \pmod 9.

Congruences

CoreHuman

How many solutions modulo 3636 does the congruence 8x≡12(mod36)8x \equiv 12 \pmod{36} have?

Congruences

CoreHuman

The second proof of Fermat's theorem reaches ap−1(p−1)!≡(p−1)!(modp)a^{p-1}(p-1)! \equiv (p-1)! \pmod p and then cancels (p−1)!(p-1)!. What justifies the cancellation?

Choose one

Congruences

StretchHuman

Claim: "If an−1≡1(modn)a^{n-1} \equiv 1 \pmod n for every aa coprime to nn, then nn is prime." Which number is a counterexample?

Choose one

Congruences

CoreFormal

Which Lean statement correctly formalises the existence half of the Chinese remainder theorem? (IsCoprime m n means um+vn=1um + vn = 1 for some u,vu, v.)

Choose one

Congruences

StretchComputational

Write crt(residues, moduli) that returns the smallest x≥0x \ge 0 with x≡ri(modmi)x \equiv r_i \pmod{m_i} for all ii, assuming the moduli are pairwise coprime. Combine the congruences one at a time, using an inverse modulo mim_i (Python's pow(a, -1, m) computes one). Then check Sunzi's answer.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.