Groups
Modular arithmetic is about working with remainders, but programming languages often return negative remainders, so always normalize with (a % MOD + MOD) % MOD.
Lucas' Theorem lets you compute C(n, k) modulo a prime p by working digit-by-digit in base p.