If I type in a power series in which one of the coefficients is itself a power series, the appropriate simplifications happen automatically. For example, typing

1 + (3 + 5 x + O[x]^3) x + O[x]^7

gives

1 + 3 x + 5 x^2 + O[x]^4

But if I instead substitute in the coefficient series after the fact, as in

(1 + a x + O[x]^7) /. a -> 3 + 5 x + O[x]^3

I end up with a SeriesData object whose coefficients are themselves SeriesData objects:

1 + (3 + 5 x + O[x]^3) x + O[x]^7

Given this structure, how can I now cause the appropriate simplifications to happen? ExpandAll doesn't do it, and I don't know what else to try.

The attached notebook gives the same example,

Lyle Ramshaw

**Attachments:**