Lucas' Theorem
Lucas' Theorem is a result in Combinatorics for finding \(\binom{n}{k} \bmod p\) when \(p\) is prime. It rewrites the numbers in base \(p\) and turns one big binomial coefficient into smaller digit-by-digit ones.
What is Lucas' Theorem?
Lucas' Theorem is a shortcut for calculating a binomial coefficient modulo a prime number. In Combinatorics, that means you can figure out the remainder of after division by without expanding huge factorials.
The setup is simple once you know the trick. Write both and in base , so each number becomes a string of digits. If and in base , then
Each digit pair gives a smaller binomial coefficient, and you multiply those together.
This works because modular arithmetic and binomial coefficients interact nicely when the modulus is prime. If any digit of is larger than the matching digit of , that small binomial coefficient is zero, so the whole product is zero mod . That gives you a fast way to spot when is divisible by .
A compact example makes the pattern clearer. To find , write 10 as 1010 and 3 as 0011 in base 2. One digit pair has and , so . That means is even, so the remainder mod 2 is 0.
The theorem is especially useful when the numbers are large. Instead of doing a huge computation, you break the problem into base- pieces, use smaller binomial coefficients, and combine them with multiplication mod . That is why Lucas' Theorem shows up in counting problems, divisibility questions, and algorithmic settings where direct computation would be messy.
Why Lucas' Theorem matters in COMBINATORICS
Lucas' Theorem gives you a clean way to read modular patterns inside binomial coefficients, which is a big deal in Combinatorics when direct calculation is ugly or impossible by hand. It connects two topics you already see often in the course, binomial coefficients and modular arithmetic, and shows that counting formulas can hide number-theory structure.
It matters because many problems are not asking for the exact value of . They ask whether it is divisible by a prime, what the remainder is, or which coefficients in a large row of Pascal's triangle are nonzero modulo . Lucas' Theorem turns those into base-representation questions, which is usually much faster.
It also gives a nice lens for spotting patterns. For example, with modulus 2, the theorem helps explain why some entries in Pascal's triangle are odd and others are even. That is a useful pattern in counting arguments and in topics that use binomial expansions.
If you are working on proofs or problem sets, this theorem is a bridge. It lets you move between the algebraic formula for and digit-by-digit reasoning in base . That kind of move comes up a lot when a combinatorics problem feels like a counting question at first, but the real trick is arithmetic structure.
Keep studying COMBINATORICS Unit 3
Official unit cheatsheet
open one-pagerHow Lucas' Theorem connects across the course
Binomial Coefficient
Lucas' Theorem is built around , so you need the basic meaning of a binomial coefficient first. The theorem does not replace the coefficient, it gives you a faster way to evaluate it modulo a prime. If you already know symmetry, Pascal's triangle, and choosing arguments, Lucas' Theorem adds a modular arithmetic layer to the same object.
Modular Arithmetic
The whole theorem lives in modular arithmetic, because the goal is to find . Instead of caring about the exact integer, you care about the remainder after division by a prime. That change in viewpoint is what makes the digit-by-digit product useful.
Base Representation
Lucas' Theorem depends on writing numbers in base . The digits are not just a formatting choice, they are the pieces the theorem multiplies together. A lot of confusion disappears once you keep track of the base correctly, especially when the base is not 10.
Vandermonde's Identity
Vandermonde's Identity is another way to combine binomial coefficients, but it works through summing products instead of breaking numbers into base- digits. They are not the same tool, but both show how binomial coefficients have structure beyond direct computation. Seeing both helps you compare different counting strategies.
Is Lucas' Theorem on the COMBINATORICS exam?
A problem set question might ask you to find without a calculator-friendly expansion. Your job is to rewrite and in base , match the digits, and multiply the smaller binomial coefficients. If one digit of is too large, you can stop and answer 0 right away.
You may also use Lucas' Theorem in divisibility questions, where the task is to show that a binomial coefficient is divisible by a prime. In that case, the digit test is the cleanest move, because a single impossible digit pair forces the whole product to vanish mod . On quizzes, this often shows up as a short computation or a justification step, not a long proof.
Key things to remember about Lucas' Theorem
Lucas' Theorem finds by breaking and into base- digits.
The theorem only applies when the modulus is a prime number.
If any digit of is bigger than the matching digit of , the binomial coefficient is 0 mod .
It is a fast way to handle large binomial coefficients without evaluating huge factorials.
The main skill is matching digits correctly in the right base before multiplying the smaller coefficients.
Frequently asked questions about Lucas' Theorem
What is Lucas' Theorem in Combinatorics?
Lucas' Theorem is a rule for computing binomial coefficients modulo a prime. You write the numbers in base , then multiply the smaller binomial coefficients from matching digits. It is a shortcut for modular counting problems.
How do you use Lucas' Theorem?
First, convert and into base . Then compute for each matching digit pair and multiply the results modulo . If any , the result is 0.
Why does Lucas' Theorem only work for prime moduli?
The theorem depends on properties of binomial coefficients modulo a prime, especially how the arithmetic behaves digit by digit. For composite moduli, the same clean product rule does not automatically hold. That is why the prime condition matters.
What is a common mistake with Lucas' Theorem?
The biggest mistake is forgetting to convert into the correct base before matching digits. Another common error is treating the digits like ordinary decimal pieces instead of base- digits. If the base is wrong, the whole product will be wrong.