A334155 a(n) is the number of length n decorated permutations avoiding the pattern 001.
1, 2, 5, 15, 57, 273, 1593, 10953, 86553, 771993, 7666713, 83871513, 1001957913, 12976997913, 181106559513, 2709277004313, 43247182412313, 733699248716313, 13182759232076313, 250070586344012313, 4994229502288460313, 104743211837530700313, 2301653725221036620313
Offset: 0
Keywords
Examples
For n=3, the a(3)=15 decorated permutations avoiding 001 are 000, 010, 100, 012, 102, 120, 021, 201, 210, 123, 132, 213, 231, 312, and 321. For n=5, 10302 does not avoid 001, because it contains the subword 002.
Crossrefs
Cf. A334154.
Programs
-
PARI
a(n) = n! + sum(j=0, n-1, (j+1)*j!); \\ Michel Marcus, May 11 2020
Formula
a(n) = n! + Sum_{j=0..n-1} (j+1)*j!.
Comments