A277668 Number of n-length words over a 5-ary alphabet {a_1,a_2,...,a_5} avoiding consecutive letters a_i, a_{i+1}.
1, 5, 21, 88, 369, 1547, 6486, 27194, 114017, 478042, 2004299, 8403476, 35233470, 147724276, 619367372, 2596837513, 10887827441, 45649674187, 191396563242, 802473294131, 3364550422879, 14106637106664, 59145260271900, 247979854176461, 1039711513563070
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (5,-4,3,-2,1)
Programs
-
Maple
a:= n-> (<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>, <0|0|0|0|1>, <1|-2|3|-4|5>>^n)[5, 5]: seq(a(n), n=0..30);
-
Mathematica
LinearRecurrence[{5,-4,3,-2,1},{1,5,21,88,369},30] (* Harvey P. Dale, Oct 08 2017 *)
Formula
G.f.: 1/(1 + Sum_{j=1..5} (6-j)*(-x)^j).