Update
OK, Please forgive the messiness of this, but I am working with something like:
d = (q = 8;
f = (lop =
Transpose[{Flatten[
Reverse[Table[
Gamma[y], {y, 1, q + 1}]] /. {ComplexInfinity -> 0}],
Flatten[Table[Binomial[n, k], {n, q, q}, {k, 0, n}]],
Flatten[Table[x^n, {n, 0, q}]]}];
{#1*#2*#3} & @@@ lop);
Flatten[f];
Total[f]);
d
which gives:
{40320 + 40320 x + 20160 x^2 + 6720 x^3 + 1680 x^4 + 336 x^5 + 56 x^6 + 8 x^7 + x^8}
I am then comparing the roots with another series, eg:
Normal[Series[E^x, {x, 0, 8}]]
which, in this case are the same.
However, I have lots of different series & was wondering if I could manipulate them as stated below.
(NB - I realise there is no 'ComplexInfinity' output in the above example, but have left it in to demonstrate that I have tried several replace techniques for the subsequent questions.)
Original question
I have several questions on list manipulation & at the risk of asking the same question multiple times, I have compiled them into the following single question:
(a) Changing alternate (or some other pattern) signs / operators:
From this:
1 + x + (x^2)/2! + (x^3)/3! + (x^4)/4! + (x^5)/5! ...
I would like to do get this:
1 - x + (x^2)/2! - (x^3)/3! + (x^4)/4! - (x^5)/5! ...
(b) Multiplying alternate (or some other pattern) elements by a given value (eg - I):
From this:
1 + x + (x^2)/2! + (x^3)/3! + (x^4)/4! + (x^5)/5! ...
I would like to do get this:
1 - I x + (x^2)/2! - I(x^3)/3! + (x^4)/4! - I(x^5)/5! ...
(c) Convert all Imaginary values in a list to real values (or vice versa), noting that there may be no pattern in the distribution here:
From this:
1 + I x + (x^2)/2! + (x^3)/3! + I(x^4)/4! + I(x^5)/5! ...
I would like to do get this:
1 + x + (x^2)/2! + (x^3)/3! + (x^4)/4! + (x^5)/5! ...
or this:
I + I x + I(x^2)/2! + I(x^3)/3! + I (x^4)/4! + I(x^5)/5! ...
I have tried various select & replace methods, but have had no luck so far.