Skip to content
Vamshi Jandhyala

Books · Number Puzzles

Chapter 24

Numbers Made of Their Own Factorials

The number 145145 has a curious property: add the factorials of its digits and you get the number back, 1!+4!+5!=1+24+120=145.1! + 4! + 5! = 1 + 24 + 120 = 145. Find every number, beyond the trivial 11 and 22, equal to the sum of the factorials of its digits.

Solution

There are just two more, and the complete list is 1,2,145,40585.1, \quad 2, \quad 145, \quad 40585. The last checks out as 4!+0!+5!+8!+5!=24+1+120+40320+120=405854! + 0! + 5! + 8! + 5! = 24 + 1 + 120 + 40320 + 120 = 40585 (recall 0!=10! = 1).

The reason the hunt ends is a race between two quantities. A number with dd digits is at least 10d110^{d-1}. The most its digit factorials can ever total is d×9!=362880dd \times 9! = 362880\,d, since 9!9! is the biggest single-digit factorial. For d=8d = 8 the number is already at least 107=10,000,00010^{7} = 10{,}000{,}000, while its digit factorials can reach at most 8×362880=2,903,0408 \times 362880 = 2{,}903{,}040, which is smaller. From eight digits on the number always outruns the sum, so no large example can exist, and a finite check settles the rest. Such numbers are called factorions, and in base ten these four are all there are.