A384677 Expansion of (1-x-2*x^2) / (1-2*x-4*x^2+2*x^3).
1, 1, 4, 10, 34, 100, 316, 964, 2992, 9208, 28456, 87760, 270928, 835984, 2580160, 7962400, 24573472, 75836224, 234041536, 722281024, 2229055744, 6879152512, 21229965952, 65518430464, 202198419712, 624010629376, 1925778076672, 5943201831424, 18341494710784
Offset: 0
Examples
a(3)=10 because we have the walks 0-1-0-1, 0-1-2-1, 0-1-2-3, 0-1-2-4, 0-1-3-1, 0-1-3-2, 0-1-3-4, 0-1-4-1, 0-1-4-2, 0-1-4-3.
Links
- Sean A. Irvine, Walks on Graphs.
- Index entries for linear recurrences with constant coefficients, signature (2,4,-2).
Crossrefs
Programs
-
Maple
a:= n-> (<<0|1|0|0|0>, <1|0|1|1|1>, <0|1|0|1|1>, <0|1|1|0|1>, <0|1|1|1|0>>^n. <<1,1,1,1,1>>)[1,1]: seq(a(n), n=0..32);
-
Mathematica
CoefficientList[Series[(1-x-2*x^2) / (1-2*x-4*x^2+2*x^3), {x, 0, 32}], x] Table[(MatrixPower[{{0,1,0,0,0},{1,0,1,1,1},{0,1,0,1,1},{0,1,1,0,1},{0,1,1,1,0}},n].{1,1,1,1,1}),{n,0,28}][[All,1]] (* Shenghui Yang, Jun 07 2025 *)
Comments