Mod

Congruence (SymPy, WMA)


Mod[x, m]

returns x modulo m.

Plot a sequence with fixed modulus:

Plot a sequence with increasing modulus:

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}$:

Zero is not allowed as a modulus:

See also PowerMod.

LCM
ModularInverse