A095364 Number of walks of length n between two adjacent nodes in the cycle graph C_9.
1, 0, 3, 0, 10, 0, 35, 1, 126, 11, 462, 78, 1716, 455, 6435, 2380, 24311, 11628, 92398, 54264, 352947, 245157, 1354102, 1081575, 5215250, 4686826, 20156580, 20030039, 78152535, 84672780, 303906051, 354822776, 1184959314, 1476390160
Offset: 1
Keywords
Links
- Index entries for linear recurrences with constant coefficients, signature (1, 5, -4, -5, 2).
Programs
-
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
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).
Comments
. - Sean A. Irvine, Nov 14 2024