Skip to content
BytePatterns

Math & Number Theory

Modular arithmetic, primes and fast powers, drawn so the shortcuts make sense.

Math & Number Theory progress0 / 5
  1. Modular ArithmeticA remainder is a position on a clock, not a leftover.4m
  2. GCD and EuclidReplace the pair with the leftover and it shrinks fast.4m
  3. Sieve of EratosthenesCross out what the primes can reach; the rest are prime.5m
  4. Fast ExponentiationSquare your way up instead of multiplying n times.5m
  5. Permutations vs CombinationsDivide by k! the moment order stops mattering.5m

Quiz yourself: 3 questions from this module

1 / 3

What is (45 + 31) % 12?