Concepts3
∑MathIntermediate
Lucas' Theorem
Lucas' Theorem lets you compute C(n, k) modulo a prime p by working digit-by-digit in base p.
#lucas theorem#binomial coefficient modulo p#prime power modulus+12
∑MathIntermediate
Linear Diophantine Equations
A linear Diophantine equation ax + by = c has integer solutions if and only if gcd(a, b) divides c.
#linear diophantine#extended euclidean algorithm#gcd+12
∑MathIntermediate
Chinese Remainder Theorem
The Chinese Remainder Theorem (CRT) reconstructs an integer from its remainders modulo pairwise coprime moduli and guarantees a unique answer modulo the product.
#chinese remainder theorem#crt#modular arithmetic+12