Concepts6
βMathAdvanced
MΓΆbius Function and Inversion
The MΓΆbius function ΞΌ(n) is 0 if n has a squared prime factor, otherwise it is (-1)^k where k is the number of distinct prime factors.
#mobius function#mobius inversion#dirichlet convolution+12
βMathAdvanced
Divisor Function Sums
Summing the divisor function d(i) up to n equals counting lattice points under the hyperbola xy β€ n, which can be done in O(βn) using floor-division blocks.
#divisor function#euler totient#mobius function+11
βMathIntermediate
Multiplicative Functions
A multiplicative function is an arithmetic function f with f(mn) = f(m)f(n) whenever gcd(m, n) = 1.
#multiplicative function#dirichlet convolution#mobius function+12
βMathIntermediate
Euler's Totient Function
Euler's Totient Function Ο(n) counts how many integers from 1 to n are coprime with n.
#euler totient#phi function#coprime count+12
βMathIntermediate
Linear Sieve
The linear sieve builds all primes up to n in O(n) time by ensuring each composite is marked exactly once by its smallest prime factor (SPF).
#linear sieve#smallest prime factor#spf+12
βMathIntermediate
Sieve of Eratosthenes
The Sieve of Eratosthenes marks multiples of each prime to find all primes up to n in O(n log log n) time.
#sieve of eratosthenes#segmented sieve#linear sieve+11