145 is a curious number, as
.
Find the sum of all numbers which are equal to the sum of the factorial of
their digits.
Note: As
and
are not sums they are not included.
𝔹𝕣𝕦𝕥𝕖 𝔽𝕠𝕣𝕔𝕖. I used the classic recursive factorial algorithm to find my factorials. I used another function to to sum the factorials of the digits and I looped from 145 (which I had determined was the lowest) up to 50,000. I don't know the math behind why the highest number is the limit but this works. For now. 92,608