Consider the example sequence $1\ 2\ 6\ 7\ 11\ 12\ ...\ [5+a_{n-2}]$. It seem obvious that this sequence can be generated with the following recursive method...
$$ \begin{align} a_0 & = 1\\ a_1 & = 2\\ a_n & = a_{(n-2)} + 5 \end{align} $$
In general any arbitrary sequence with I initial conditions that repeats every R could be generated with
$$ \begin{align} a_{0..I} & = \text{initial values...}\\ a_n & = a_{(n-I)} + R \end{align} $$
WolframAlpha was good enough to generate a solution for my example sequnce in the form of...
$$ a_n = 1/4 (-9-3 (-1)^n+10 n) $$
However, I am searching for a general formula/algorithm. Using generating functions I can get as far as...
$$ A(x) = (1-x^I)^{-1} \left[ \sum_{k=0}^{k = I} {(a_kx^k)} - \frac {Rx^I} {x-1} \right] $$
At least I hope that's right. Honestly I am struggling to map the simple sample sequence to the correct expresson. I am guessing there is either a general formula/process or it is provably "hard."
So, how do you solve this in general? Any hints on the particular case would be nice too. Is there a name for this type of sequence?
Let the period be $p$ (not necessarily prime)
As you noticed, you can break down your recurrence into a purely periodic aspect, and a 'constant' on consecutive terms aspect. The constant part is easily dealt with using $ r \lfloor \frac{n-1}{p} \rfloor $, where $r$ is the amount in which it increases after each period.
Let $\omega$ be a primitive pth root of unity. Consider the $p-$tuple $A_k = (\omega^k, \omega^{2k}, \ldots , \omega^{pk} ) $, for $1 \leq k \leq p$. Then, these $p$ tuples are linearly independent, which follows from considering the Vandermonde determinant. Hence, the initial terms can be written as a linear combination of these terms.
E.g. In your example of $1, 2, 6, 7, \ldots$, we have $p = 2$ and $r=5$. We have $-1$ is the primitive 2nd root of unity, and so $A_1 = (-1,1) $ and $A_2 = (1,1)$. We can form $(1,2) = \frac{1}{2} A_1 + \frac{ 3}{2} A_2$.
Hence, your general term is $\frac{1}{2} (-1)^n + \frac{3}{2} (1)^n + 5\lfloor \frac{n-1}{2} \rfloor$
If you do not want the floor function to be involved, you can simply use $\frac{rn}{p}$, which will change your initial values slightly. In this case, the terms have the form
$$ -\frac{3}{2} + \frac{5}{2}, -3 + \frac{5\times 2}{2}, -\frac{3}{2} + \frac{5\times 3}{2}, -3 + \frac{5\times 4}{2}, \ldots $$
We can form $(-\frac{3}{2}, -3) = \frac{-3}{4} A_1 + \frac{-9}{4} A_2$.
Hence, your general term is $\frac{-3}{4} (-1)^n + \frac{-9}{4} (1)^n + \frac{5n}{2}$, which agrees with Wolfram.