OFFSET
0,4
COMMENTS
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.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 4, -3, -2).
FORMULA
a(n) = 2^n/7*Sum_{k=0..6} cos(2*Pi*k/7)^(n+1).
G.f.: x(1-x-x^2) / ((1-2x)(1+x-2x^2-x^3)).
7*a(n) = 2^n+A094648(n+1). - R. J. Mathar, Nov 05 2024
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Herbert Kociemba, May 31 2004
EXTENSIONS
More terms from Robert G. Wilson v, Jun 01 2004
STATUS
approved