%I #7 Jul 25 2015 00:35:51
%S 0,1,0,3,0,10,1,35,9,126,55,462,286,1717,1365,6451,6188,24463,27132,
%T 93518,116281,360031,490337,1394582,2043275,5430530,8439210,21242341,
%U 34621041,83411715,141290436,328589491,574274008,1297937234,2326683921
%N Number of walks of length n between two adjacent nodes in the cycle graph C_7.
%C In general, a(n,m) = 2^n/m*Sum_{k=0..m-1} cos(2*Pi*k/m)^(n+1) counts walks of length n between two adjacent nodes in the cycle graph C_m.
%F a(n) = 2^n/7*Sum_{k=0..6} cos(2*Pi*k/7)^(n+1).
%F G.f.: x(1-x-x^2) / ((1-2x)(1+x-2x^2-x^3)).
%t f[n_] := FullSimplify[ TrigToExp[ 2^n/7 Sum[ Cos[2Pi*k/7]^(n + 1), {k, 0, 6}]]]; Table[ f[n], {n, 0, 34}] (* _Robert G. Wilson v_, Jun 01 2004 *)
%Y Equals A095307(n+1) - A095308(n-1).
%K easy,nonn
%O 0,4
%A _Herbert Kociemba_, May 31 2004
%E More terms from _Robert G. Wilson v_, Jun 01 2004
|