# How to solve an inequality containing the sum of factorials and powers

In previous question, I asked how one would simplify the following equation for the case where the variables are very big:

$\sum\limits^{k}_{i=m}(N-i)^{k-i}(\frac{1}{N})^k\frac{k!}{(k-i)!i!} \leq a$

This answer was basically to use an approximation like Stirling's formula. Having implemented this with some code, it still takes too long to find the maximum value of N so that the inequality holds true. Therefore, I need a direct solution for N. So the new question is, how would you go about solving this equation for N?

(Some simplifications are acceptable, but I would like to have it as accurate as possible. The values this equation will be used for are all in the 100,000-1,000,000 range, except $m$, which is in the 100s range.)

• What can be said about m and k? Because if m were smal, the sum with m = 0 can be probably computed explicitely using exponential generating functions (e.g.f.) and then you can approximate only the first terms. Of course, if m is too big, this is not feasible. Also if k is too big, the solution with e.g.f. might not help you much. Nov 12 '10 at 15:40

• By simple variable substitution I've managed to reduce the formula to the following: $-a(x+k)^k + \sum\limits_{j=0}^{y}x^{j}\bigl(\frac{k}{k-j}\bigr) \leq 0$. This seems right in the domain of root finding, I see. Oct 14 '10 at 14:01
• Sorry, that formula was meant to be: $-a(x+k)^k + \sum\limits_{j=0}^{y}x^{j}\binom{k}{k-j} \leq 0$ Oct 14 '10 at 14:08