# How to find the general term of a particular sequence like $(0,a_{1},a_{2},a_{3},\dots, a_{n}, 0,a_{1},a_{2},a_{3},\dots, a_{n},\dots)$

I would like to know if there is a method to find the general term of sequences like those below.

$(0,a_{1},a_{2},a_{3},\dots, a_{n}, 0,a_{1},a_{2},a_{3},\dots, a_{n},\dots)$,

and so on. I've found some of them in exercises, but I don't know how to find a general method to solve them.

-
Define $a_0=0$ and say it's $a_{(k\;\bmod\; n+1)}$? – anon Feb 10 '12 at 22:27

Let $\zeta=e^{2\pi i/(n+1)}$, so $\zeta$ is a primitive complex root of unity of order $n+1$. Then there are constants $b_0,b_1,\dots,b_n$ such that for all $r$ the $r$th term in your sequence is given by the formula $$b_0+b_1\zeta^r+b_2\zeta^{2r}+\cdots+b_n\zeta^{nr}$$ You can find the $b_j$ by solving the system of $n+1$ linear equations in $n+1$ unknowns $$a_r=b_0+b_1\zeta^r+b_2\zeta^{2r}+\cdots+b_n\zeta^{nr},\qquad r=0,1,\dots,n$$ This isn't quite as bad as it looks, since the matrix of coefficients has a very special form and there are tricks based on that observation, but still doing it by hand even for $n=4$ could get very messy very fast.
Let's do a not-so-messy example: $(0,8,3,1,0,8,3,1,0,8,3,1,\dots)$ Here $n=3$, so $\zeta=i=\sqrt{-1}$, and the equations are \eqalign{0&=b_0+b_1+b_2+b_3\cr8&=b_0+b_1i-b_2-b_3i\cr3&=b_0-b_1+b_2-b_3\cr1&=b_0-b_1i-b_2+b_3i\cr} Add the first and 3rd equations to get $b_0+b_2=3/2$, add the 2nd and 4th to get $b_0-b_2=9/2$, deduce $b_0=3$, $b_2=-3/2$. Then it's easy to get $b_1$ and $b_3$, stick 'em in the first displayed formula, and verify that it works.
$b_n = 0$ if $n \equiv 0$ mod $[n]$ and $b_n = a_{k+1}$ othewise such that $n\equiv k$ mod $[n]$ and $k \in [0,n-1]$