Divisors Calculator

Explore the multiplicative structure of any positive integer. Instantly compute all divisors, divisor count, divisor sum, proper aliquot sum, and classification (perfect, abundant, deficient) — with full prime factorization.

Accepts integers from 1 up to 107 (safe & fast). Larger inputs may be slower.
? Perfect (28)
? Abundant (12)
⚡ Deficient (16)
✨ Perfect (496)
? Perfect (8128)
? Highly composite (60)
? Square (100)
Privacy-first: All calculations run locally in your browser. No data is uploaded or stored.
Performance & recommended limits: For the best interactive experience, use n ≤ 10,000,000. Numbers up to 50 million are still feasible but may take a few seconds. Extremely large inputs (>108) will trigger a confirmation and may cause temporary unresponsiveness due to JavaScript’s single-threaded nature. This is a limitation of client-side computation, not a flaw in the algorithm.

Divisor functions & number classification

In number theory, divisors (or factors) of an integer n are the integers that divide n without leaving a remainder. The set of all positive divisors is fundamental for studying perfect numbers, amicable pairs, and many multiplicative functions. This calculator provides instant access to τ(n) (the divisor function), σ(n) (sum-of-divisors function), and the aliquot sum s(n) = σ(n) – n, which determines if a number is perfect (s(n)=n), abundant (s(n)>n), or deficient (s(n) < n).

If \( n = p_1^{a_1} p_2^{a_2} ... p_k^{a_k} \) (prime factorization), then:

\[ \tau(n) = (a_1+1)(a_2+1)...(a_k+1) \]

\[ \sigma(n) = \prod_{i=1}^k \frac{p_i^{a_i+1}-1}{p_i-1} \]

These classical results date back to Euclid and were refined by Euler, Dirichlet, and modern analytic number theory.

How the calculation works (step-by-step example with n = 60)

We first compute the prime factorization using trial division up to √n. Then, given the factorization, we generate all divisors by combining exponents.

Example: n = 60
1. Prime factorization: \( 60 = 2^2 \times 3^1 \times 5^1 \).
2. Exponents: for 2 → a₁=2, for 3 → a₂=1, for 5 → a₃=1.
3. Divisor count τ(60) = (2+1)(1+1)(1+1) = 3×2×2 = 12 divisors.
4. Divisor sum σ(60) = (2³−1)/(2−1) × (3²−1)/(3−1) × (5²−1)/(5−1) = (7/1) × (8/2) × (24/4) = 7 × 4 × 6 = 168.
5. All divisors are generated by exponent combinations: {2⁰,2¹,2²} × {3⁰,3¹} × {5⁰,5¹} → 1,2,3,4,5,6,10,12,15,20,30,60.
6. Aliquot sum s(60) = 168 − 60 = 108 → abundant (108 > 60).

Our implementation follows exactly this logic, but fully automated for any integer you enter.

Validation & accuracy: This calculator has been tested against known perfect numbers (28, 496, 8128, 33550336) and random integers up to 105. Results match OEIS sequences A000005 (τ) and A000203 (σ). The implementation follows standard multiplicative divisor generation. Every computation is fully deterministic.

Why use the Divisors Calculator?

  • Education: Visualize divisor structure, explore multiplicative properties, and test conjectures about perfect numbers.
  • Competitive Math: Quickly solve problems involving divisor sums, abundant/deficient classification, and divisor count parity.
  • Research & Hobby: Analyze aliquot sequences, discover interesting numbers, or verify properties for OEIS sequences.
  • Programming Practice: Compare your own divisor algorithm output with verified results.

Real-world & theoretical applications

  • Cryptography: Prime factorization is the basis of RSA security; divisor functions appear in primality testing.
  • Perfect numbers: Even perfect numbers correspond to Mersenne primes via Euclid-Euler theorem.
  • Amicable numbers: Pairs (a,b) where s(a)=b and s(b)=a, studied for centuries (e.g., 220 & 284).
  • Music theory & harmonics: Divisor ratios relate to overtones and just intonation.
Case study: Perfect number 8128

8128 is the 4th perfect number (1, 2, 4, 8, 16, 32, 64, 127, 254, 508, 1016, 2032, 4064, 8128). Its divisor sum σ(8128) = 16256 = 2×8128, thus s(n)=8128. Perfect numbers are rare and intimately connected with Mersenne primes. Our tool instantly verifies its classification and reveals the geometric growth of divisors.

Frequently Asked Questions

τ(n) counts the number of positive divisors, crucial in combinatorics and number theory (e.g., number of rectangular arrangements). σ(n) sums divisors and appears in algebraic number theory — the sum-of-divisors function is multiplicative and used to define perfect numbers, multiply-perfect numbers, etc.

If s(n) > n → abundant (sum of proper divisors exceeds n). If s(n) < n → deficient. If s(n) = n → perfect. Most numbers are deficient, while abundant numbers become more frequent as n grows.

For numbers ≤ 10 million it's near-instant. For up to 10^8 it may take 1–2 seconds. For extremely large numbers (≥10^9) we recommend computational software, but our tool includes optimizations like early stopping in trial division.

Yes. n = 1 has a single divisor {1}. τ(1)=1, σ(1)=1, s(1)=0 → classified as deficient (by convention).

Proper divisors are all positive divisors of n except n itself. The aliquot sum s(n) is exactly the sum of proper divisors. Perfect numbers are those where the sum of proper divisors equals the number itself. Abundant numbers have a proper divisor sum greater than n, deficient numbers have it smaller.
References: Hardy & Wright, "An Introduction to the Theory of Numbers"; OEIS A000203 (σ(n)), A000005 (τ(n)); Weisstein, Eric W. "Divisor Function." MathWorld.
This tool is maintained by the GetZenQuery Tech team. all algorithms are standard, and accuracy is verifiable by comparing against known OEIS entries.