# How to combine DifferenceRoot objects for odd and even-indexed terms

I'm trying to analyze a certain infinite sequence $S$, indexed by positive integers starting from $1$. It can be split into two subsequences:

• $S^{odd}$ by removing all even-indexed elements and keeping all odd-indexed ones, and
• $S^{even}$ by removing all odd-indexed elements and keeping all even-indexed ones.

Each of these two sequences has its own indexing by positive integers starting from $1$, so indexes of their elements do not match indexes of corresponding elements in $S$, e.g. $S^{odd}_3=S_5$, $S^{even}_2=S_4$.

I got two different DifferenceRoot expressions representing $S^{odd}$ and $S^{even}$. I would like to merge them into a single DifferenceRoot expression representing $S$. I suppose I need to somehow align their indexing and then use DifferenceRootReduce.

What is the simplest way to do that?

-
OK, I did it manually, by adjusting coefficiens containing index variable n, and specifying $4$ initial values of the sequence instead of $2$. Luckily, the recurrence relation turned out to be the same for both sequences after coefficients were adjusted. I'm still interested in more automated way to do this. –  Vladimir Reshetnikov Nov 28 '13 at 2:47