Lucas's theorem
For a prime p, Lucas's theorem computes a binomial coefficient modulo p as the product of binomial coefficients of the base-p digits of its arguments.
For a prime p, Lucas's theorem computes a binomial coefficient modulo p as the product of binomial coefficients of the base-p digits of its arguments.