Groups
Category
Level
The floor sum computes S(n,m,a,b) = sum_{i=0}^{n-1} floor((a i + b)/m) efficiently in O(log(min(a,m))) time.
The discrete logarithm problem asks for x such that g^x โก h (mod p) in a multiplicative group modulo a prime p.
A quadratic residue modulo an odd prime p is any a for which x^2 โก a (mod p) has a solution; exactly half of the nonzero classes are residues.
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.