Explicit formula for a sequence of alternating differences Imagine this sequence: $1, 11, 12, 22, 23, 33, 34, 44$, ...
Obviously the sequence is alternating in adding 10 and adding 1. You can find the formula for the differences easily with $5*(-1)^x+6$, but I can't find a way to find the exact explicit formula for the sequence, assuming there is one. 
 A: If you try to find a formula for the terms in positions $2,4,6,\ldots$ which are   $11,22,33,\ldots$ you get $11 \frac{x}2 = \frac{11}{2}x$
If you try to find a formula for the terms in positions $1,3,5,\ldots$ which are   $1,12,23,\ldots$ you get $11 \frac{x-1}2 +1 = \frac{11}{2}x-\frac{9}{2}$ 
These expressions are of the form $\frac{11}{2}x-\frac{9}{4} \pm \frac{9}{4}$  and you can see that the $x$th term is  $$\frac{11}{2}x-\frac{9}{4} + \frac{9}{4}(-1)^x$$
A: Given the difference between each term (which you incorrectly calculated) you have the recurrence relation
$$a_0=1$$
$$a_{n+1}=a_n+\frac92(-1)^n+\frac{11}2$$
Which can be solved by noticing that each term is simply the sum of every difference before it;
$$\begin{align}
a_n
&=a_0+\sum_{k=0}^{n-1}\left(\frac92(-1)^n+\frac{11}2\right)\\
&=1+\frac{11}2n+\frac92\sum_{k=0}^{n-1}(-1)^n\\
&=1+\frac{11}2n+\frac94(1-(-1)^n)\\
&=\frac{13}4+\frac{11}2n-\frac94(-1)^n\\
\end{align}$$
A: On average you're adding $\dfrac{11}{2}$. Then, counting steps from zero,


*

*On even-numbered steps, you add $\dfrac{9}{2}$, for a net effect of $+10$;

*On odd numbered steps, you subtract $\dfrac{9}{2}$ for a net effect of $+1$.


This gives the recursive formula
$$x_0 = 1 \quad \text{and} \quad x_{n+1} = x_n + \dfrac{11 + (-1)^n \cdot 9}{2}  \text{ for all } n \ge 0$$
But then we obtain
$$x_n = 1 + \sum_{k=0}^{n-1} \dfrac{11+(-1)^k \cdot 9}{2} = 1 + \dfrac{11n}{2} + \dfrac{9}{2} \cdot \dfrac{1-(-1)^n}{1-(-1)}$$
$$= \boxed{\dfrac{13}{4} + \dfrac{11n}{2} + (-1)^{n+1}\dfrac{9}{4}}$$
It's not pretty, but it works!
A: Hint:
$$a_{2n}=11n$$
and $$a_{2n+1}=a_{2n}+1=11n+1$$
