Leandro Junes

Divisor Count

Compute the number of positive divisors of n from its prime factorization.

Inputs

A positive integer, arbitrarily large.

Factorization difficulty depends on the size of the factors, not just the size of the input. The calculator may return a partial factorization for difficult inputs. Computation runs locally in your browser.

Try

Result

—

Prime factorization

—

How it works

If n = p₁^a₁ ⋯ p_r^a_r, then every positive divisor of n is obtained by independently choosing an exponent between 0 and a_i for each prime p_i. Each prime offers a_i+1 choices, and different choices give different divisors, so

τ(n) = (a₁ + 1)(a₂ + 1) ⋯ (a_r + 1).

For n=1 there are no primes, the product is empty, and \tau(1)=1: 1 has exactly one positive divisor, namely 1. The calculator factors n with the same engine as the Prime factorization calculator.