How to determine whether a number can be expressed as a sum of factorials

353 Views Asked by At

I'm looking for a way to determine (without calculating) whether a positive integer N can be written as the sum of factorials of random numbers where a number cannot be used more than once. For instance, $$7 = 1! + 3! = 0! + 3!$$ $$or,$$ $$6 = 3!$$ But we can't write 5 or 11 in such a way. So I'm now looking for a way to know whether a given number can be written in such a way without calculating. If there is, then how?