Unitary Divisor Function Calculator
Number Theory
- Factorise: 36 = 2^2 x 3^2.
- A unitary divisor d must satisfy gcd(d, n/d) = 1; here they are 1, 4, 9, 36.
- Equivalently, multiply (1 + p^a) over the prime powers: (1 + 2^2) x (1 + 3^2).
- sigma*(n) = 50, against the ordinary divisor sum sigma(n) = 91.
Divisors usually come in complementary pairs, d and n/d. A divisor earns the title unitary when the pair is coprime - when gcd(d, n/d) = 1, so d and its complement share no prime factor at all. The unitary divisor function sigma*(n) sums exactly those divisors, and it behaves differently enough from the ordinary divisor sum sigma(n) to have its own theory. This calculator lists the unitary divisors and computes their sum two ways.
The list way is the definition: test every divisor for the gcd condition. The fast way is a product: if n = product of prime powers p^a, then sigma*(n) = product of (1 + p^a). For 36 = 2^2 x 3^2 that gives (1 + 4)(1 + 9) = 50, matching the unitary divisors 1, 4, 9 and 36 - note how 2, 3, 6, 12 and 18 are excluded: each shares a prime with its complement.
The intuition is that a unitary divisor must take each prime power whole or not at all - it can swallow 4 or ignore 2 entirely, but it cannot take a bare 2 out of 36, because the leftover 18 still contains a 2. That all-or-nothing structure is what makes the product formula work and what gives the count of unitary divisors its clean form: 2 raised to the number of distinct prime factors.
Try 60 as an experiment: 60 = 2^2 x 3 x 5, so sigma*(60) = (1 + 4)(1 + 3)(1 + 5) = 120 = 2 x 60 exactly - 60 is unitary perfect, a fact you can verify here in one step by comparing sigma* with twice the input. The ordinary sigma(60) is 168, so 60 is not perfect in the classical sense; the two theories genuinely part company on the same small number.
Worked examples
sigma* of 36
(36)
| Unitary divisor function sigma*(n) | 50 |
| Unitary divisors | 1, 4, 9, 36 |
| Unitary divisor count | 4 |
| Ordinary sigma(n) | 91 |
sigma* of 6
(6)
| Unitary divisor function sigma*(n) | 12 |
| Unitary divisors | 1, 2, 3, 6 |
| Unitary divisor count | 4 |
| Ordinary sigma(n) | 12 |
sigma* of 30
(30)
| Unitary divisor function sigma*(n) | 72 |
| Unitary divisors | 1, 2, 3, 5, 6, 10, 15, 30 |
| Unitary divisor count | 8 |
| Ordinary sigma(n) | 72 |
The gcd condition, unpacked
Take n = 30 and the divisor 6: the complement is 5, gcd(6, 5) = 1, so 6 is unitary. Take the divisor 10: complement 3, gcd = 1, unitary. Take 15: complement 2, gcd(15, 2) = 1, unitary. In fact every divisor of 30 is unitary - 30 is squarefree, no prime appears twice, so no divisor can share a prime with its complement. Hence sigma*(30) = sigma(30) = 72.
Contrast 36: the divisor 6 has complement 6, gcd 6 - maximally non-unitary. The divisor 12 has complement 3, sharing the prime 3. Only the whole prime powers and their coprime combinations survive: 1, 4, 9, 36. The condition is a filter on how divisors may split the prime powers: they may not split them at all.
The product formula
Because each prime power p^a must go entirely to d or entirely to n/d, building a unitary divisor is a sequence of independent choices - one per distinct prime - and the sum over all choices factorises into the product of (1 + p^a). This is the same multiplicativity trick behind the ordinary sigma formula, with prime powers treated as atoms.
The calculator shows both computations: the filtered divisor list and the product. They must agree, and their agreement is a genuine check - a bug in either the gcd filter or the factorisation would break it. For n up to a million the list method is instant, so there is no reason to trust the formula blindly.
sigma* versus sigma
The two functions agree exactly on squarefree n, where every divisor is unitary. They diverge as prime powers deepen: sigma(36) = 91 counts all nine divisors, while sigma*(36) = 50 counts four. For a prime power p^a the contrast is starkest: sigma adds the whole geometric series 1 + p + ... + p^a, while sigma* adds only 1 + p^a.
Neither is 'better' - they measure different decompositions of n. Sigma belongs to the classical divisor theory of perfect and abundant numbers; sigma* belongs to the arithmetic of unitary divisors, which has its own perfect-number analogue (unitary perfect numbers, where sigma*(n) = 2n - 12 and 60 are the smallest examples after 6).
Counting unitary divisors
The count function is as clean as the sum: n with omega distinct prime factors has exactly 2^omega unitary divisors, one for each subset of its prime powers. 36 has two distinct primes, hence 4 unitary divisors. 30 has three, hence 8. A prime power has just 2: 1 and itself.
This makes unitary divisors a tidy teaching example of multiplicative functions: both the count and the sum are determined prime-by-prime, and both factorise over the prime factorisation in the way the calculator's steps display.
Unitary perfect and related numbers
A unitary perfect number satisfies sigma*(n) = 2n. Only a handful are known - 6, 60, 90, 87,360 and a fifth enormous example - and whether infinitely many exist, or whether any odd one exists, is open. The concept generalises the perfect numbers (6 is perfect in both senses, being squarefree) into territory where far less is known.
Playing with this calculator around multiples of 6 is a quick way to feel why the known examples are rare: sigma*(n)/n needs to hit exactly 2, and the ratio is a product of terms (1 + p^a)/(p^a) that almost never aligns. Recreational in flavour, open in status - a good combination.
Using the calculator well
Enter n up to 1,000,000. Read the divisor list first - it is the definition made visible - then the product formula in the steps, which is the computation you would do by hand. The ordinary sigma(n) is included in the outputs precisely so the divergence (or, for squarefree n, the agreement) is one glance away.
All arithmetic is exact integer work. If you are comparing against a reference, check whether it defines unitary divisors with the same gcd condition - a small number of sources use a subtly different convention for prime powers, which changes values exactly where the two conventions can be told apart.
Computing by hand
The hand method mirrors the calculator: factorise, write each prime power as a block, and multiply the (1 + block) terms. For 96 = 2^5 x 3: sigma* = (1 + 32)(1 + 3) = 132. The divisor-list method would test all 12 divisors of 96 and keep only 1, 3, 32 and 96 - a good check that the two methods are really describing the same set.
The commonest hand error is to use (1 + p + p^2 + ... + p^a) - that is the ordinary sigma factor. The unitary version keeps only the endpoints of that sum, 1 and p^a, which is the entire content of the definition translated into algebra.
Where unitary divisors appear
Beyond their own theory, unitary divisors show up in the study of arithmetic functions as the 'unitary convolution' analogue of ordinary Dirichlet convolution - every classical identity built from divisor sums has a unitary twin, usually with cleaner behaviour over prime powers. They also appear in the classification of multiply perfect numbers and in some exponential-sum estimates.
For the purposes of this page the takeaway is simpler: sigma* is the second-most-natural divisor sum, and meeting it recalibrates an intuition trained only on sigma - divisors are not obliged to split prime powers, and forbidding the split changes the arithmetic in interesting, computable ways.
FAQs
What is a unitary divisor?
A divisor d of n with gcd(d, n/d) = 1 - it shares no prime factor with the complementary divisor.
What is sigma*(36)?
50 - the unitary divisors of 36 are 1, 4, 9 and 36.
How is sigma*(n) computed from the factorisation?
Multiply (1 + p^a) over each prime power in n: for 36 that is (1 + 4) x (1 + 9) = 50.
When does sigma*(n) equal sigma(n)?
When n is squarefree - then every divisor is unitary, as with 30, where both sums are 72.
How many unitary divisors does n have?
2 raised to the number of distinct prime factors of n.
Is sigma* multiplicative?
Yes - sigma*(a x b) = sigma*(a) x sigma*(b) whenever a and b are coprime.