%I #21 Aug 17 2024 11:05:21
%S 1,4,15,56,208,773,2872,10672,39655,147350,547523,2034486,7559742,
%T 28090486,104378617,387850022,1441172953,5355109869,19898515060,
%U 73938894118,274742112508,1020886629235,3793410119173,14095551768590
%N Number of length n words on {1,2,3,4} with at most one consecutive 1 and at most two consecutive 2's and at most three consecutive 3's and at most four consecutive 4's.
%C Column k=4 of A242464.
%H Fung Lam, <a href="/A242495/b242495.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1, 5, 12, 18, 22, 20, 15, 8, 3).
%F G.f.: (1 + x)*(1 + x^2)*(1 + x + x^2 )*(1 + x + x^2 + x^3 + x^4)/(1 - x - 5*x^2 - 12*x^3 - 18*x^4 - 22*x^5 - 20*x^6 - 15*x^7 - 8*x^8 - 3*x^9). (corrected by _Fung Lam_, May 18 2014)
%e a(3) = 56 because there are 64 length 3 words on {1,2,3,4} but we don't count 111, 112, 113, 114, 211, 222, 311, or 411.
%t nn=23;CoefficientList[Series[1/(1-Sum[v[i]/(1+v[i])/.v[i]->(z-z^(i+1))/(1-z),{i,1,4}]),{z,0,nn}],z]
%Y Cf. A242452.
%K nonn,easy
%O 0,2
%A _Geoffrey Critzer_, May 16 2014