OFFSET
1,3
COMMENTS
In general 2^n/m*Sum(r,0,m-1,Cos(2Pi*k*r/m)Cos(2Pi*r/m)^n) is the number of walks of length n between two nodes at distance k in the cycle graph C_m. Here we have m=9 and k=1.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 5, -4, -5, 2).
FORMULA
a(n) = 2^n/9 * sum(r=0..8, cos(2*Pi*r/9)^(n+1)).
G.f.: x(-1+x+2x^2-x^3)/((1+x)(-1+2x)(1-3x^2+x^3)).
a(n) = a(n-1) + 5*a(n-2) - 4*a(n-3) - 5*a(n-4) + 2*a(n-5).
PROG
(PARI) a(n) = round(2^n/9*sum(r=0, 8, cos(2*Pi*r/9)^(n+1))) \\ Michel Marcus, Jul 18 2013
(PARI) Vec( x*(-1+x+2*x^2-x^3)/((1+x)*(-1+2*x)*(1-3*x^2+x^3))+O(x^66) ) \\ Joerg Arndt, Jul 18 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Herbert Kociemba, Jul 03 2004
STATUS
approved