A263894
Number of permutations of [n] containing exactly ten occurrences of the consecutive pattern 132.
Original entry on oeis.org
654729075, 2862426470400, 1296211708989225, 261264015391703040, 34500885158438507610, 3502077835791610920960, 297315399971212318577070, 22214713615158982916505600, 1510589164324758020706100635, 95690236900543163501872250880, 5743287914726512704740717709585
Offset: 21
-
b:= proc(u, o, t) option remember; series(`if`(u+o=0, 1,
add(b(u-j, o+j-1, 0)*`if`(j<=t, x, 1), j=1..u)+
add(b(u+j-1, o-j, j-1), j=1..o)), x, 11)
end:
a:= n-> coeff(b(n, 0$2), x, 10):
seq(a(n), n=21..35);
A343535
Number T(n,k) of permutations of [n] having exactly k consecutive triples j, j+1, j-1; triangle T(n,k), n>=0, 0<=k<=floor(n/3), read by rows.
Original entry on oeis.org
1, 1, 2, 5, 1, 20, 4, 102, 18, 626, 92, 2, 4458, 564, 18, 36144, 4032, 144, 328794, 32898, 1182, 6, 3316944, 301248, 10512, 96, 36755520, 3057840, 102240, 1200, 443828184, 34073184, 1085904, 14304, 24, 5800823880, 413484240, 12538080, 174000, 600, 81591320880
Offset: 0
T(4,1) = 4: 1342, 2314, 3421, 4231.
Triangle T(n,k) begins:
1;
1;
2;
5, 1;
20, 4;
102, 18;
626, 92, 2;
4458, 564, 18;
36144, 4032, 144;
328794, 32898, 1182, 6;
3316944, 301248, 10512, 96;
36755520, 3057840, 102240, 1200;
443828184, 34073184, 1085904, 14304, 24;
5800823880, 413484240, 12538080, 174000, 600;
81591320880, 5428157760, 156587040, 2214720, 10800;
1228888215960, 76651163160, 2105035440, 29777520, 175800, 120;
...
-
b:= proc(s, l, t) option remember; `if`(s={}, 1, add((h->
expand(b(s minus {j}, j, `if`(h=1, 2, 1))*
`if`(t=2 and h=-2, x, 1)))(j-l), j=s))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(
b({$1..n}, -1, 1)):
seq(T(n), n=0..13);
-
b[s_, l_, t_] := b[s, l, t] = If[s == {}, 1, Sum[Function[h,
Expand[b[s ~Complement~ {j}, j, If[h == 1, 2, 1]]*
If[t == 2 && h == -2, x, 1]]][j - l], {j, s}]];
T[n_] := CoefficientList[b[Range[n], -1, 1], x];
T /@ Range[0, 13] // Flatten (* Jean-François Alcover, Apr 26 2021, after Alois P. Heinz *)
Comments