Compute the number of positive integers less than 10! which can be expressed as the sum of at most 4 (not necessarily distinct) factorials.
Solution
Since , we ignore any possible 0!'s in our sums. Call a sum of factorials reduced if for all positive integers , the term ! appears at most times. It is straightforward to show that every positive integer can be written uniquely as a reduced sum of factorials. Moreover, by repeatedly replacing occurrences of ! with !, every non-reduced sum of factorials is equal to a reduced sum with strictly fewer terms, implying that the aforementioned reduced sum associated to a positive integer in fact uses the minimum number of factorials necessary. It suffices to compute the number of nonempty reduced sums involving with at most 4 terms. By stars and bars, the total number of such sums, ignoring the reduced condition, is . The sums that are not reduced must either contain two copies of 1!, three copies of 2!, or four copies of 3!. Note that at most one of these conditions is true, so we can count them separately. If terms are fixed, there are ways to choose the rest of the terms, meaning that we must subtract . Our final answer is .