Burnside's Lemma, Principle of Inclusion-Exclusion / Multiplicative function, Segmented Sieve, Memorization.