Number of n-length words w over a 3-ary alphabet such that w is empty or a prefix z concatenated with letter a_i and i=1 or 0 < #(z,a_{i-1}) >= #(z,a_i), where #(z,a_i) counts the occurrences of the i-th letter in z.

A240609

Number of n-length words w over a 3-ary alphabet such that w is empty or a prefix z concatenated with letter a_i and i=1 or 0 < #(z,a_{i-1}) >= #(z,a_i), where #(z,a_i) counts the occurrences of the i-th letter in z.

Terms

    a(0) =1a(1) =1a(2) =2a(3) =5a(4) =13a(5) =35a(6) =94a(7) =254a(8) =688a(9) =1872a(10) =5115a(11) =14038a(12) =38689a(13) =107055a(14) =297336a(15) =828699a(16) =2317098a(17) =6498114a(18) =18273861a(19) =51521238a(20) =145604868a(21) =412407942a(22) =1170507375a(23) =3328570513a(24) =9482518041a(25) =27059673745a(26) =77340925350a(27) =221382318131a(28) =634578781229

External references