OFFSET
0,4
COMMENTS
Form a graph from a triangle and its midpoint triangle. a(n) counts walks of length n between two vertices of the original triangle.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,7,2,-4).
FORMULA
G.f.: x^2*(1+2*x)/((1+x-x^2)*(1-2*x-4*x^2)).
a(n) = (2^n/3-(-1)^n/3)*(((1+sqrt(5))/2)^(n-1)/sqrt(5)-((1-sqrt(5))/2)^(n-1)/sqrt(5)).
a(n) = a(n-1) + 7*a(n-2) + 2*a(n-3) - 4*a(n-4). - Wesley Ivan Hurt, Jun 05 2026
MATHEMATICA
(* Alternative: *)
LinearRecurrence[{1, 7, 2, -4}, {0, 0, 1, 3}, 30] (* Paolo Xausa, Jun 06 2026 *)
CROSSREFS
KEYWORD
easy,nonn,changed
AUTHOR
Paul Barry, Mar 22 2004
EXTENSIONS
More terms from Paolo Xausa, Jun 06 2026
STATUS
approved
