login
A384611
Expansion of (1+2*x-x^3) / (1-5*x^2+2*x^4).
1
1, 2, 5, 9, 23, 41, 105, 187, 479, 853, 2185, 3891, 9967, 17749, 45465, 80963, 207391, 369317, 946025, 1684659, 4315343, 7684661, 19684665, 35053987, 89792639, 159900613, 409593865, 729395091, 1868384047, 3327174229, 8522732505, 15177080963, 38876894431
OFFSET
0,2
COMMENTS
Number of walks of length n starting at vertex 2 in the following graph:
2
/ \
0-1 3
\ /
4.
EXAMPLE
a(3)=9 because we have the walks 2-1-0-1, 2-1-2-1, 2-1-2-3, 2-1-4-1, 2-1-4-3, 2-3-2-1, 2-3-2-3, 2-3-4-1, 2-3-4-3.
MAPLE
a:= n-> (<<0|1|0|0|0>, <1|0|1|0|1>, <0|1|0|1|0>, <0|0|1|0|1>, <0|1|0|1|0>>^n. <<1, 1, 1, 1, 1>>)[3, 1]:
seq(a(n), n=0..32);
MATHEMATICA
CoefficientList[Series[(1+2*x-x^3) / (1-5*x^2+2*x^4), {x, 0, 32}], x]
LinearRecurrence[{0, 5, 0, -2}, {1, 2, 5, 9}, 33] (* Vincenzo Librandi, Oct 14 2025 *)
PROG
(Magma) I:=[1, 2, 5, 9]; [n le 4 select I[n] else 5*Self(n-2)-2*Self(n-4): n in [1..35]]; // Vincenzo Librandi, Oct 14 2025
CROSSREFS
Cf. A005824 (vertices 0, 1), A079162 (vertex 3), A000079 (missing edge {0,1}).
Sequence in context: A342556 A002935 A128266 * A374244 A088356 A246350
KEYWORD
nonn,easy,walk
AUTHOR
Sean A. Irvine, Jun 04 2025
STATUS
approved