# Solve an inequality involving a sum with a parameter

Good day.

I am new to Mathematica and I am looking for advice. Is it possible to solve

$$\sum_{k=0}^{n} \frac{p^k}{k!}>0$$

for $n$ where $p$ is a parameter? When I do

Solve[Sum[p^k/k!, {k, 0, n}] > 0, {n}, Integers]


I get the following:

Solve::nsmet: This system cannot be solved with the methods available to Solve


Is there anything I can do about it or is it impossible to solve?

What I am trying to get is an expression for $n$ which contains $p$ as a parameter or a procedure which finds such an $n$ with the number of steps that can be determined beforehand. Like a for loop, not while. It seems to me that Mathematica has problems with sums.

• If $p$ is positive, then your sum is always positive. Negative $p$ is a different can of worms… – J. M.'s technical difficulties Jul 28 '15 at 10:44
• The incomplete gamma function doesn't have a closed-form inverse in this case; you'll have to resort to numerics for particular values of p. – J. M.'s technical difficulties Jul 28 '15 at 10:49
• There's always brute-force: Table[If[GammaRegularized[n + 1, p] < 0, n, ##&[]], {n, 100}]. – J. M.'s technical difficulties Jul 28 '15 at 11:00
• FindInstance[Sum[p^k/k!, {k, 0, n}] > 0, {n, p}, Integers, 5] – Bob Hanlon Jul 28 '15 at 15:08
• @ValerySaharov maybe you could clarify exactly what you want then, by editing your original question (use the "edit" link right under your question). – MarcoB Jul 28 '15 at 15:25

The title of your question states that you will be satisfied with an instance of {p, n} that satisfies Sum[p^k/k!, {k, 0, n}] > 0. Here is a function to find any number of such instances:

instances[m_Integer?Positive] :=
Block[{p, n, k},
FindInstance[Sum[p^k/k!, {k, 0, n}] > 0 && p ∈ Reals && n ∈ Integers, {n, p}, m]]


And here are two

instances

{{n -> 168, p -> 11/2}, {n -> 485, p -> 493/10}}


If this is not answer to your question, we need to know why.

• @ValerySaharov. As a native speaker of English, I find your interpretation of "[f]ind an instance" strange beyond all understanding. – m_goldberg Jul 30 '15 at 16:48
• @ValerySaharov And as you can see, Mathematica's interpretation of FindInstance seems to reproduce native speakers' understandings. I suggest, you edit the title accordingly (such as "express n with p" or something like that). – LLlAMnYP Jul 31 '15 at 0:50