Groups
Category
Level
A derangement is a permutation with no element left in its original position, often written as !n or D(n).
Lucas' Theorem lets you compute C(n, k) modulo a prime p by working digit-by-digit in base p.
The Inclusion-Exclusion Principle (IEP) corrects overcounting by alternately adding and subtracting sizes of intersections of sets.
A linear Diophantine equation ax + by = c has integer solutions if and only if gcd(a, b) divides c.
The binomial theorem expands (x + y)^n into a sum of terms using binomial coefficients that count how many ways to choose k items from n.
Stars and Bars counts the ways to distribute n identical items into k distinct bins using combinations.
MillerโRabin is a fast primality test that uses modular exponentiation to detect compositeness with very high reliability.
Permutations count ordered selections, while combinations count unordered selections.
A multiplicative function is an arithmetic function f with f(mn) = f(m)f(n) whenever gcd(m, n) = 1.
Euler's Totient Function ฯ(n) counts how many integers from 1 to n are coprime with n.
Modular arithmetic is arithmetic with wrap-around at a fixed modulus m, like numbers on a clock.
A modular inverse of a modulo m is a number a_inv such that a ร a_inv โก 1 (mod m).