Let me preface by saying that I am a college student (just finished first year) whose background is primarily programming and not math - I know that the line between the two is easily blurred, but what I mean is that complex numeric computations are not my forte.
Today I was working on Project Euler's 34th challenge:
And I figured out pretty quickly how to actually calculate the sum of the factorials of the digits (I'm working in Ruby), but what I don't understand is how I'm supposed to know or determine the 'ceiling'. It says "all numbers", as opposed to "all numbers less than N." How can I determine the highest XYZ for which X! + Y! + Z! = XYZ?145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145.
Find the sum of all numbers which are equal to the sum of the factorial of their digits.
Note: as 1! = 1 and 2! = 2 are not sums they are not included.
I don't want the number itself, since that's part of the challenge, and I'd prefer some helpful hints as opposed to the answer outright, but I can be a little dense sometimes so more is better than less.
Many thanks in advance.
-Andrew




