= Solution
For the homogeneous <linear recurrence relation>, substitute $y_k=r^k$. Its <characteristic equation of a linear recurrence> is $r^2-r+1=0$, with roots $e^{i\pi/3}$ and $e^{-i\pi/3}$. Taking real <linear combinations> gives
$$
\boxed{y_k=A\cos(k\pi/3)+B\sin(k\pi/3).}
$$
These two real sequences are <linearly independent>: their values at $k=1,2$ form a matrix with <determinant> $\sqrt3/2\ne0$. Thus their two constants account uniquely for arbitrary first two values.
Let $P_k=\sum_{n=1}^k a_n/(k-n+1)$ and reindex as $P_k=\sum_{j=1}^k a_{k-j+1}/j$. In $P_{k+2}-P_{k+1}+P_k$, each term with $1\le j\le k$ has coefficient
$$
a_{k-j+3}-a_{k-j+2}+a_{k-j+1}=0.
$$
The term $j=k+1$ is $(a_2-a_1)/(k+1)=0$, and the remaining term is $a_1/(k+2)=1/(k+2)$. This explicitly proves that $P_k$ is the required particular solution, a <discrete Green convolution for the period-six recurrence>.
The unit-response coefficients have the homogeneous form just found. The values $a_1=a_2=1$ give zero cosine coefficient and sine coefficient $2/\sqrt3$, so
$$
a_n=\frac2{\sqrt3}\sin(n\pi/3).
$$
Subtracting this particular solution from any other solution leaves a homogeneous recurrence. Thus the complete answer is
$$
\boxed{y_k=A\cos(k\pi/3)+B\sin(k\pi/3)
+\frac2{\sqrt3}\sum_{n=1}^k\frac{\sin(n\pi/3)}{k-n+1},\qquad k\ge1.}
$$
Back to article page