This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


represents the sum of for all i that divide n.
includes only those divisors for which gives True.
  • n can be symbolic or a positive integer.
  • form and cond must be Function objects.
  • DivisorSum is automatically simplified when n is a positive integer.
  • DivisorSum is automatically simplified when form is a polynomial function.
Evaluate at positive integers:
Evaluate at positive integers:
Click for copyable input
Click for copyable input
Exact values are generated at positive integers:
Conditions on divisors can be specified:
DivisorSum works on formal expressions:
DivisorSum works for symbolic argument:
DivisorSum automatically simplifies for polynomial functions:
Closed forms:
Compute the Lambert series for Euler totient function:
Number of polynomials over that are irreducible of degree n:
Distribution of irreducible polynomials modulo 5:
Logarithmic plot of the count for :
Twisted divisor sum:
Define the unitary convolution:
Sum of squares:
The arguments to DivisorSum are not affected by N:
After evaluation, results may be affected by N:
The function f is applied to the divisors:
Only divisors that explicitly yield True on the conditions are used:
New in 7