Congruence (SymPy, WMA)
Mod[x, m]Mod[14, 6]
Mod[-3, 4]
Mod[-3, -4]
Plot a sequence with fixed modulus:
DiscretePlot[Mod[n, 8], {n, 50}]
Plot a sequence with increasing modulus:
DiscretePlot[Mod[100, m], {m, 30}]
Fermat's “little” theorem states that for a prime number p, and another number a which is relatively prime to that $a^{(p-1)} = 1_{mod\:p}$:
p=Prime[4]; Table[Mod[a^(p-1), p], {a, 1, p-1}]
Zero is not allowed as a modulus:
Mod[5, 0]
See also PowerMod.