Practical Number Calculator
Check whether every smaller integer can be written as a sum of distinct divisors of n.
What it does
A practical number is a positive integer n such that every integer from 1 up to the sum of the divisors of n can be written as a sum of distinct divisors of n. The first few are 1, 2, 4, 6, 8, 12 and 16. The property makes the divisors surprisingly flexible.
Testing the definition directly would mean checking every integer up to the divisor sum, which is expensive. A criterion by Stewart and Sierpinski reduces the test to the prime factorization: the smallest prime must be 2, and each later prime must not exceed one plus the sum of divisors already built.
This page applies that criterion with exact integer arithmetic and reports the divisor sum and factorization alongside the verdict. The divisor sum is the upper limit of the range that the representability property covers.
The input limit is one hundred thousand. Factoring and the divisor sum both stay immediate at that size, and no search over subsets is needed.
Results are exact, and the tool returns a readable error for values outside the allowed range.
How to use
- Enter a whole number n from 1 to 100,000.
- Read the classification in the main result box.
- Check the divisor sum, which is the range covered by the property.
- Use the factorization to see how the prime test was applied.
- The default n = 12 reproduces the worked example.
- Try n = 10 to see a number that fails the criterion.
Formula
- n
- The integer being tested.
- p_k
- The kth prime factor in increasing order.
- sigma
- The sum of divisors of the part built from earlier prime powers.
The empty product before the first prime has divisor sum one, so the first prime must be at most two, which forces it to be 2. For later primes the condition compares the prime with one plus the running divisor sum. The case n equals 1 is practical by convention.
Worked example
Example: n = 12
The page opens with n = 12.
- Factor 12 as 2^2 x 3.
- The first prime is 2, which passes the first condition.
- The divisor sum of 2^2 is 1 + 2 + 4 = 7.
- The next prime is 3, which is at most 7 + 1, so it passes.
- The tool reports Practical, divisor sum 28, and factorization 2^2 x 3.
- Every number up to 28 can indeed be built from distinct divisors of 12.
Reference table
| n | Factorization | Divisor sum | Practical |
|---|---|---|---|
| 1 | none | 1 | Yes |
| 2 | 2 | 3 | Yes |
| 6 | 2 x 3 | 12 | Yes |
| 10 | 2 x 5 | 18 | No |
| 12 | 2^2 x 3 | 28 | Yes |
| 16 | 2^4 | 31 | Yes |
Limits
- Inputs above 100,000 are rejected to keep factoring quick.
- The tool applies the criterion, it does not list the subset sums.
- Only positive integers are accepted.
- The divisor sum is computed from the full factorization, not estimated.
Common mistakes
- Testing only divisibility of smaller numbers rather than sums of distinct divisors.
- Forgetting that odd numbers greater than 1 cannot be practical.
- Using the next prime rather than one plus the divisor sum as the bound.
- Counting divisors with repetition when forming sums.
- Assuming every even number is practical.
Try it yourself
Quick checks. Answers sit tucked under each question.
Is 12 practical?
Yes. Its primes 2 and 3 satisfy the Stewart Sierpinski condition, and its divisor sum is 28.
Is 10 practical?
No. After the factor 2 the divisor sum is 3, but the next prime 5 exceeds 3 + 1.
Is 1 practical?
Yes, by the standard convention.
Questions
What is the covering range?
Every integer up to the sum of the divisors of n must be representable.
Who gave the criterion?
The prime factor test is due to work by Stewart and Sierpinski.
Can an odd number be practical?
Only 1. Every other practical number is even.
Is the divisor sum exact?
Yes, it is computed from the prime factorization.
Are values exact?
Yes. Integer arithmetic only is used.
What input range is accepted?
Whole numbers from 1 through 100,000.