Qm

The number that equals the sum of the factorials of its digits

Find a three-digit number that equals the sum of the factorials of its digits. For example, 123 would qualify if 1! + 2! + 3! were 123 (it is 9, so it does not).

Then explain why such numbers can only have a handful of digits, however far you search.

Show a hint

The factorials of the digits are 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880. A three-digit number is at most 999, so digits 7, 8 and 9 are out. Think about what a 5 or a 6 would force.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

The number equal to the sum of the cubes of its digitsThe nine-digit number whose every prefix dividesThe two-digit number that is the square of its digit sumThe number that rotates when multipliedKaprekar's constant, 6174
All questions →