Factorion checker
145 is a factorion: 1! + 4! + 5! is 1 + 24 + 120, which adds back up to 145. Enter a positive whole number and see each digit's factorial, the total and a plain yes or no. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- N
- 145
- Digit count
- 3
- Digits
- 1, 4, 5
- Factorial sum
- 145
A factorion is a positive integer that equals the sum of the factorials of its own decimal digits. Classic examples are one hundred forty-five, because one factorial plus four factorial plus five factorial is one plus twenty-four plus one hundred twenty, and forty thousand five hundred eighty-five, built the same way from its five digits. Students, contest solvers, and recreational number theorists often need a quick yes-or-no verdict with an auditable breakdown of each digit contribution. This factorion checker accepts a single positive integer, expands its digits, looks up each digit factorial, sums those values, and reports whether the sum matches the original number. Values below one are rejected as invalid input so the contract stays aligned with the usual positive-integer definition used in textbooks and coding challenges.
What a factorion is and which numbers qualify
In base ten, write a positive integer as a sequence of digits from zero through nine. Replace every digit with its factorial—zero factorial and one factorial are both one, two factorial is two, three factorial is six, four factorial is twenty-four, five factorial is one hundred twenty, and so on up to nine factorial, which is three hundred sixty-two thousand eight hundred eighty—then add those factorials. If the total equals the original integer, the number is a factorion.
The identity is strict equality, not a modular condition and not a digit-power sum: Armstrong or narcissistic numbers raise each digit to a fixed power equal to the digit count, whereas factorions always use factorial of the digit itself. In base ten only a handful of positive factorions exist; the well-known multi-digit examples are one hundred forty-five and forty thousand five hundred eighty-five, and the single-digit cases one and two are sometimes listed because one equals one factorial and two equals two factorial.
Larger candidates fail quickly once the digit-factorial sum cannot catch up with the magnitude of n: for d digits the maximum possible sum is d times nine factorial, which grows linearly in d while n grows exponentially in d, so exhaustive searches stay finite. Teaching materials often pair factorions with strong numbers in some curricula (another name for the same digit-factorial property) and contrast them with happy numbers, perfect numbers, and other recreational classifications.
What you can do with it
Classroom and homework verification
Students submit a positive integer and check whether it equals the sum of its digit factorials, with each factorial term visible for marking.
FAQ
What is a factorion?
A factorion is a positive integer equal to the sum of the factorials of its own decimal digits. For example, 145 = 1! + 4! + 5! = 1 + 24 + 120.
Which factorions exist in base ten?
Only a handful. The well-known ones with several digits are 145 and 40585, and 1 and 2 are sometimes added to the list because each equals its own factorial.
How is a factorion different from an Armstrong number?
An Armstrong number raises each digit to a power equal to the number of digits. A factorion uses the factorial of each digit instead, and the sum must match the number exactly.
Why are there only finitely many factorions?
Each digit adds at most nine factorial, so the largest possible sum grows only in step with the digit count, while the number itself grows exponentially with each extra digit. Past a certain size the sum can never catch up.
Why is 24 not a factorion?
Because 2! + 4! is two plus twenty-four, which makes twenty-six. The sum overshoots 24, so the answer is no, and both terms are shown so you can see exactly why.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/numth/factorion-check \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"n":145}'const res = await fetch("https://api.kit.forhosting.com/numth/factorion-check", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"n": 145
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/numth/factorion-check",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"n": 145
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/numth/factorion-check", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"n":145}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"n":145}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/numth/factorion-check", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"n": 145
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "numth.factorion_check",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What a factorion is and which numbers qualify
The mathematical content is elementary factorial arithmetic plus digit extraction, which makes the property ideal for homework, interview warm-ups, and automated checkers that must show every term rather than only a boolean.
Input contract, response fields, and error behaviour
There is no search over a range, no non-decimal base, and no multiprecision path beyond the published maximum. POST a JSON body with required field n holding a positive integer, either as a JSON number inside the safe integer range or as a plain digit string. Aliases number and value are accepted for the same field. The implementation validates that n is present, finite, integral, and at least one; missing n, non-integers, fractions, and values below one fail with invalid_input and are not billed. On success the body echoes n, reports digit_count and the ordered digits array most significant first, lists terms as objects each carrying digit and factorial so every contribution is auditable, gives factorial_sum as the integer total of those factorials, and sets is_factorion true exactly when factorial_sum equals n. Example: n equals one hundred forty-five yields digits one, four, five; factorials one, twenty-four, one hundred twenty; factorial_sum one hundred forty-five; and is_factorion true. Example: n equals twenty-four yields factorial_sum twenty-six and is_factorion false, because two factorial plus four factorial is twenty-six, not twenty-four.
Where a factorion checker earns its keep and what it costs
Classrooms and tutoring platforms use a factorion checker so learners can verify digit-factorial identities without hand-multiplying long factorials or missing a zero factorial edge case. Coding-interview prep sites and contest graders need a deterministic oracle that marks strong-number or factorion problems consistently and rejects non-positive input instead of silently treating zero as a special case. Keep requests small, stay within the documented upper bound on n, and you get reproducible factorion verdicts for homework checkers, LMS plugins, recreational math pages, and edge workers without standing up a computer-algebra system. Integer-classification pipelines that already tag primes, Armstrong numbers, or happy numbers can add is_factorion with a single item-priced call instead of embedding another ad hoc loop. Delivery works from the web form, the task API, SDK clients, and other KIT channels without changing the mathematical contract.
Integration use cases
Interview and contest grading
Auto-graders for factorion or strong-number problems use a deterministic JSON oracle that rejects values below one and never invents false positives.
Integer classification pipelines
Scripts that tag recreational properties can call one item-priced endpoint for is_factorion alongside other number-theory checks.
Technical questions
How do I check whether n is a factorion?
Send a JSON body with positive integer field n. The response returns digits, each digit factorial in terms, factorial_sum, and is_factorion true or false.
What happens if n is below 1?
The request fails with invalid_input. This checker requires a positive integer; zero and negatives are rejected and not charged.
Is 145 a factorion?
Yes. Digits 1, 4, and 5 contribute factorials 1, 24, and 120, which sum to 145, so is_factorion is true. Another multi-digit factorion is 40585.
What does the factorion checker cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.