How can we tell Series to treat the expansion parameter as an integer?

It is simple for Mathematica to find an asymptotic expansion for $\frac{1}{-1+p}$ as $p \rightarrow \infty$. However, if we want to restrict $p$ to be an integer and also include some terms that simplify for integer p (but not generally) then Series by itself will no longer do the job (without some prodding, I expect).

Is there a simple way to use Series to find the asymptotic expansion of $$\frac{1}{(-1)^p+p}$$ as $p \rightarrow \infty$, assuming integer $p$?

-

1 Answer

Simplicity is arguably in the eye of the beholder, but the following code gets you closer to $\sum_{k=0}^{n}(-1)^k p^{-(k+1)}$

ps = Series[1/((-1)^p + p), {p, \[Infinity], 1}];
psEven = Simplify[ps,  Assumptions -> p \[Element] Integers \[And] Mod[p, 2] == 0]
psOdd = Simplify[ps,  Assumptions -> p \[Element] Integers \[And] Mod[p, 2] == 1]


for either even p or odd p.

-
Using Simplify as a post-processor to Series seems like a good way to go about this. – Daniel Lichtblau Jan 31 '14 at 16:28