ā” Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 30s17 days 22 hours 19 minutes 30 seconds.
ā” Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 19m 30s17 days 22 hours 19 minutes 30 seconds.

Sign in to watch this lesson
Advanced - Combinatorics, Games and Puzzles Ā· 5:08
The textbook n! / (k! (n - k)!) with a modular inverse only works modulo a large prime. For a small prime, Lucas's theorem multiplies the binomials of the base-p digit pairs, which for p = 2 turns into a bit test and draws the Sierpinski triangle; for a prime power we strip the prime out of every factorial and track its exponent; and any other modulus is split into prime powers and recombined with the Chinese remainder theorem.