The divisor function counts the positive integer divisors of a positive integer . In particular , because has just one positive integer divisor. More generally the notation gives and the sum-of-divisors function . Thus the divisor function counts the positive integer divisors, while adds their sizes. [ref]
Floor and arithmetic functions by Darij Grinberg. Darij Grinberg, MIT 18.781 lecture notes, Definition 2.1.2 and Theorem 2.1.6
If the prime factorization is with distinct prime numbers and positive exponents , thenThe short proof is a count: each positive integer divisor has a unique form , where . There are choices at each prime number, and choosing them gives every positive integer divisor exactly once. For there are no prime factors and the product is .
For , choose and to obtain . The six values are ; sorted, the positive integer divisors are . Therefore . The diagram makes the independent exponent choices visible.
The prime factorization gives a three-by-two array of positive integer divisors , so the divisor function has
. Details. This count is useful because a known prime factorization gives without testing every smaller positive integer for divisibility. It also proves the divisor function is a multiplicative function: coprime integers have disjoint prime factors, so their exponent choices combine. For example , but , so it is not a completely multiplicative function. Equivalently, under Dirichlet convolution, counting ordered pairs of positive integers whose product is .
For an integer , the generalized divisor function counts ordered factorizations of a positive integer into positive integer factors. If , thenTo prove the formula, distribute the exponent among the factors. The number of nonnegative exponent tuples with that sum is the stars and bars count, and different primes can be assigned independently.
Thus and is the ordinary divisor function. For , . The ordered condition matters: exchanging two unequal factors changes the counted tuple. Absolute convergence for permits multiplying Dirichlet series, giving and connecting these counts with powers of the Riemann zeta function.
Factor a positive integer while multiplying the exponent-plus-one contributions to its divisor count. After removing all prime factors below the current trial factor, a trial factor that divides the remainder must itself be prime. Remove its full power and advance. Once the trial factor's square exceeds the remainder, any remainder greater than one is prime and contributes a factor two. The invariant separates the original integer into removed prime powers and the remaining coprime factor; no factor array is necessary.
A positive integer whose divisor count strictly exceeds that of every smaller positive integer. A record scan maintains the largest earlier value of the divisor function and emits exactly candidates exceeding it. Equality does not create a new record; the first candidate is handled by a zero initial record.
The perfection quotient of a positive integer is the ratio , where is the sum-of-divisors function. It distinguishes the three familiar classes: a deficient number has quotient below two, a perfect number has quotient two, and an abundant number has quotient above two. For example, the quotients of , and are , and .
For coprime integers , the quotient is multiplicative, since . At a prime power, its factor isConsequently a prescribed quotient can be studied one prime power at a time, tracking the remaining numerator and denominator.
Two distinct positive integers are amicable when the sum of the proper divisors of is and the sum of the proper divisors of is . The pair is an example. Iterating the proper-divisor sum can also produce longer directed cycles.
A pair of distinct positive integers in which each is the proper-divisor sum of the other. The integers and form an amicable pair.
For each , the divisor function satisfies the displayed bound. Write , so . For all sufficiently large primes, for every . For each of the finitely many smaller primes, is finite. Multiplying these finitely many constants proves the bound. Products of a fixed number of divisor functions obey the same conclusion after reducing .
For , the divisor function obeysOne proof compares it with the generalized divisor function , the number of ordered factorizations into four positive integers. At a prime power , the two counts are and . The inequality holds for every nonnegative integer , and multiplicativity gives . Hence, with the harmonic number,Applying partial summation to this upper bound also yields
