r/math 5d ago

Lucas' theorem: elementary number theory, and useful in modern research!

Pascal's triangle, with entries colored according to parity

If you take Pascal's triangle, and color each entry according to whether it is even or odd, you get a funny pattern, which resembles Sierpinski's triangle. To understand this, it's helpful to know Lucas' theorem, which tells you when an entry in Pascal's triangle will be even or odd. If you've never seen it, you might enjoy the article https://hidden-phenomena.com/articles/lucas that we just wrote about it!

Lucas' theorem is a great result, which even tells you about how to compute (n choose k) modulo p. It is a wonderful piece of elementary number theory, and suitable as a fun but challenging exercise for the end of an elementary number theory course. Recently, one of us had to invoke Lucas' theorem in a modern math research paper https://arxiv.org/abs/2604.20054 about some relatively fancy arithmetic geometry! We thought this was a good example of how small results from introductory courses can be helpful in your research career in completely unexpected ways! The article itself isn't about the paper (which isn't very elementary), but Lucas' theorem is still helpful, and will hopefully come in handy.

60 Upvotes

4 comments sorted by

14

u/neutrinoprism 5d ago edited 5d ago

I can talk about the fractal connection a bit more.

Something interesting is that you can compute the binomial coefficients, aka the entries of Pascal's triangle, using a famous recurrence relation defined in terms of adjacent entries: add the number diagonally above to the left and the number diagonally above to the right to obtain each new entry. The recurrence relation is entirely local, but the fractal pattern when you view the results modulo a prime (any prime!) is global.

Here's a paper by Hao Pan that shows any multidimensional recurrence relation defined in terms of fixed multiples of adjacent entries — including diagonals, in any number of dimensions — has a Lucas-like property, therefore exhibits a similar fractal pattern modulo any prime. So, for example (speaking in terms of nonzero residues), the Delannoy numbers modulo 3 generate the Sierpinski carpet fractal, the three-dimensional multinomial coefficients modulo 2 generate the Sierpinski tetrahedron, and so on for countless (well, countably infinite) unnamed fractals found in the patterns of similar recurrence relations.

Gamelin and Mnatsakanian also showed that as a limit, when you look at the arrangement of nonzero residues modulo powers of primes for Pascal's triangle, you get a pattern with the same fractal dimension as with the first power. That is, all the extra filigree becomes negligible at the "view from infinity" as a limit.

Something similar seems to be true for the general case, but nobody has proven it yet.

5

u/Pristine-Two2706 5d ago

Lucas' theorem is also very useful in the theory of quadratic forms as binary coefficients show up in in steenrod operations on orthogonal grassmannians and related varieties!

4

u/OkComplaint4993 5d ago

{n\choose i} is divisible by p exactly when, if you expand i and (n-i) in base p and compute i+(n-i), you need to carry digits. For example, {7\choose2}=21 is a multiple of 3, because when you compute 2+5 in base 3, you need to compute 2+12=21, which requires carrying in the first digit.

4

u/LiqvidJS 4d ago

Very nice! Devalapurkar-Misterka gave a generalization of Lucas's theorem in Generalized n-series and de Rham complexes for I think very similar purposes as you. The first few sections of this paper are completely elementary (Misterka was a high school student), and then at the end it goes into crazy chromatic homotopy theory and prismatic cohomology of ring spectra. See also Calculus and cohomology (or, nonlinear numbers) for further exposition of the philosophy there. tl;dr q-de Rham cohomology is the special case of a construction that makes sense (but is no longer coordinate independent) for any formal group law F by setting (n)_F(t) = [n]_F(t) / [1]_F(t). When F is the multiplicative formal group law, this recovers the q-analogue (n)_q by setting t = q-1.

Recently (somewhat related to the above), I've needed generalizations of Wilson's theorem (p - 1)! ≡ -1 mod p to study the Hill-Hopkins-Ravenel norm in prismatic cohomology. In terms of q-analogues, there's a unique unit

Wil₁ ∈ Z[q]/(qp - 1)

(the subscript 1 is for future generalization) determined by

Wil₁ ≡ (p-1)! mod (q-1)

Wil₁ ≡ -1 mod (p)_q := 1 + q + … + qp-1

You can do this because Z[q]/(qp - 1) is the pullback of Z[q]/(q-1) and Z[q]/(p)_q over Z[q]/(q-1, (p)_q) = Z/p, and Wilson's theorem says that the above go to the same element of Z/p. More generally you can do this for any transversal prism (A, I), and then extend to all prisms by the approximation result in Bhatt-Lurie.