The recurrence relation is:
Let $\{y_{j}\}_{j\in \mathbb{N}}$ be a sequence of integers and x a real number then define:
$P_{1}(x):=y_{1}+(-1)^{1}|x-y_{1}|$ and the general j-step as $P_{j}(x):=y_{j}+(-1)^{j}|P_{j-1}(x)-y_{j}|$.
So $P_{j}(x)=y_{j}+(-1)^{j}|y_{j}-y_{j-1}+(-1)^{j}|y_{j-1}-y_{j-2}+(-1)^{j-1}|...|y_{2}-y_{1}+(-1)^{2}|y_{1}-x|||..||$
given the above is correct, is there a way to compactify it?
Thanks
$${}{}{}{}\text{No.}{}{}{}{}$$