Factorion Calculator
Check whether a number equals the sum of the factorials of its own decimal digits.
What it does
A factorion is a number equal to the sum of the factorials of its decimal digits. The word is a blend of factorial and digit. In base ten there are only four factorions: 1, 2, 145 and 40585, which makes them a small and curious set.
The example 145 works because one factorial is 1, four factorial is 24 and five factorial is 120, and those three values add to 145. The larger example 40585 uses five factorial, four factorial and eight factorial among its terms.
The reason the list is finite is that factorials grow much faster than the number of digits contributes to a number's size. Beyond a modest digit count, the sum of digit factorials can never catch up with the number itself.
This page computes the sum with exact integer arithmetic and reports it beside the verdict, so a failed test can be checked immediately. The factorial of each digit from zero to nine is a small fixed value.
The input limit is ten million, which covers all four known factorions and plenty of ordinary numbers besides.
How to use
- Enter a whole number n from 1 to 10,000,000.
- Read the classification in the main result box.
- Check the sum of digit factorials beside it.
- Use the digit count to see how many terms were added.
- The default n = 145 reproduces the worked example.
- Try n = 40585 to see the largest base ten factorion.
Formula
- n
- The integer being tested.
- d
- One decimal digit of n.
- d!
- The factorial of that digit.
The factorials needed are for digits zero through nine, the largest being nine factorial which is 362880. Zero factorial is 1 by convention. Since only four base ten factorions exist, most inputs return a negative verdict.
Worked example
Example: n = 145
The page opens with n = 145.
- Write the digits: 1, 4 and 5.
- Compute the factorials: 1! = 1, 4! = 24 and 5! = 120.
- Add them: 1 + 24 + 120 = 145.
- The sum equals the original number.
- The tool reports digit factorial sum 145, Factorion, and 3 digits.
- For 40585 the same process gives back 40585.
Reference table
| n | Digit factorial sum | Factorion |
|---|---|---|
| 1 | 1 | Yes |
| 2 | 2 | Yes |
| 145 | 145 | Yes |
| 146 | 745 | No |
| 40585 | 40585 | Yes |
Limits
- Only base ten factorials of decimal digits are used.
- Inputs above 10,000,000 are rejected.
- The tool tests one number at a time.
- Only four factorions exist in base ten, so most tests fail.
Common mistakes
- Using powers of digits instead of factorials, which tests Armstrong numbers.
- Forgetting that zero factorial is one.
- Using nine factorial as the only large term without checking digits.
- Assuming there are many factorions in base ten.
- Rounding the sum for large inputs.
Try it yourself
Quick checks. Answers sit tucked under each question.
Is 145 a factorion?
Yes, because 1! + 4! + 5! = 1 + 24 + 120 = 145.
Is 146 a factorion?
No. The digit factorial sum is 1 + 24 + 720 = 745.
How many factorions are there in base ten?
Four: 1, 2, 145 and 40585.
Questions
What is a factorion?
A number equal to the sum of the factorials of its digits.
How many are there?
Only four in base ten: 1, 2, 145 and 40585.
Why is the list finite?
Factorials grow faster than the number of digits adds to a number's size.
What is zero factorial?
It is 1 by convention.
Is this an Armstrong number?
No. Armstrong numbers use powers, while factorions use factorials.
What input range is accepted?
Whole numbers from 1 through 10,000,000.