A177526
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, down, up, down.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 680, 4480, 33600, 285434, 2684680, 27812170, 313926560, 3842611240, 50625902600, 714873188122, 10764733339179, 172258243070682, 2918333808555034, 52191694000877878, 982479378895814520, 19419959862935129834, 402131210857811703926
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>5, 0, `if`(u+o=0, 1,
add(b(u-j, o+j-1, [1, 3, 4, 1, 6][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 2, 2, 5, 2][t]), j=1..o)))
end:
a:= n-> `if`(n=0, 1, add(b(j-1, n-j, 1), j=1..n)):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 21 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 5, 0, If[u + o + t < 6, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 3, 4, 1, 6}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 2, 2, 5, 2}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
A177527
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, down, up, up.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 694, 4676, 35952, 310464, 2984176, 31536583, 363591384, 4541789148, 61089594448, 880428095803, 13534614549829, 221066397540186, 3823205871530350, 69792946997645295, 1341134146478847104, 27059669661295560098, 571973335506443017436
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>5, 0, `if`(u+o=0, 1,
add(b(u-j, o+j-1, [1,3,4,1,3][t]), j=1..u)+
add(b(u+j-1, o-j, [2,2,2,5,6][t]), j=1..o)))
end:
a:= n-> `if`(n=0, 1, add(b(j-1, n-j, 1), j=1..n)):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 21 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 5, 0, If[u + o + t < 6, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 3, 4, 1, 3}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 2, 2, 5, 6}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
A177529
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, up, down, up.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 659, 4186, 31457, 264834, 2465550, 25334981, 283322383, 3430384284, 44803783445, 626719448981, 9347396890481, 148174002240074, 2486833885400060, 44052337160572208, 821495697573151302, 16085109561896603059, 329939476998354570978
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>5, 0, `if`(u+o+t<6, (u+o)!,
add(b(u-j, o+j-1, [1, 3, 1, 5, 1][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 2, 4, 2, 6][t]), j=1..o)))
end:
a:= n-> `if`(n=0, 1, add(b(j-1, n-j, 1), j=1..n)):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 21 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 5, 0, If[u + o + t < 6, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 3, 1, 5, 1}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 2, 4, 2, 6}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
A177530
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, up, up, up.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 706, 4844, 37968, 334656, 3278896, 35330098, 415289184, 5288377848, 72522052240, 1065579141202, 16700472769061, 278099720959114, 4903387952699182, 91258390273541562, 1787828412527348984, 36776310494510881628, 792526608079806841508
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>5, 0, `if`(u+o+t<6, (u+o)!,
add(b(u-j, o+j-1, [1, 3, 1, 3, 3][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 2, 4, 5, 6][t]), j=1..o)))
end:
a:= n-> `if`(n=0, 1, add(b(j-1, n-j, 1), j=1..n)):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 21 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 5, 0, If[u + o + t < 6, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 3, 1, 3, 3}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 2, 4, 5, 6}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
A177531
Number of permutations of {1,...,n} avoiding adjacent step pattern up, up, down, down, down.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 710, 4900, 38640, 342720, 3376800, 36603975, 432850200, 5545086300, 76500496800, 1130799033000, 17829310686875, 298684478837750, 5298029559119250, 99196696006173000, 1955043380032965000, 40458045505003152500, 877115498011253207500
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>5, 0, `if`(u+o+t<6, (u+o)!,
add(b(u-j, o+j-1, [1, 1, 4, 5, 6][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 3, 2, 2][t]), j=1..o)))
end:
a:= n-> `if`(n=0, 1, add(b(j-1, n-j, 1), j=1..n)):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 21 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 5, 0, If[u + o + t < 6, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 1, 4, 5, 6}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 3, 3, 2, 2}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
A177532
Number of permutations of {1,...,n} avoiding adjacent step pattern up, up, down, up, up.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 701, 4774, 37128, 326089, 3184221, 34191983, 400308461, 5076257396, 69329710171, 1014612340743, 15838898430094, 262706269352374, 4613506518038420, 85520547931176984, 1668736482655334275, 34189755475407632542, 733851215342599413848
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>5, 0, `if`(u+o+t<6, (u+o)!,
add(b(u-j, o+j-1, [1, 1, 4, 1, 1][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 3, 5, 6][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 21 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 5, 0, If[u + o + t < 6, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 1, 4, 1, 1}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 3, 3, 5, 6}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
A177534
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, down, down, down, down.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5034, 40224, 361584, 3611520, 39679200, 475580160, 6175139244, 86348433264, 1293675609960, 20674025187840, 351037594569600, 6311110770685440, 119767524064039062, 2392482308124881520, 50181968955048369480, 1102681392427432825920
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>6, 0, `if`(u+o+t<7, (u+o)!,
add(b(u-j, o+j-1, `if`(t=1, 1, t+1)), j=1..u)+
add(b(u+j-1, o-j, 2), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 21 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 6, 0, If[u + o + t < 7, (u + o)!,
Sum[b[u - j, o + j - 1, If[t == 1, 1, t + 1]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, 2], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 20 2022, after Alois P. Heinz *)
A177535
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, down, down, down, up.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5011, 39856, 356616, 3545280, 38768400, 462487631, 5977005477, 83186290826, 1240460869290, 19730730733920, 333451122953921, 5966845400766578, 112703780178989573, 2240828272067529040, 46780834679854338540, 1023129822229674425971
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>6, 0, `if`(u+o+t<7, (u+o)!,
add(b(u-j, o+j-1, [1, 3, 4, 5, 6, 1][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 2, 2, 2, 2, 7][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 22 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 6, 0, If[u + o + t < 7, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 3, 4, 5, 6, 1}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 2, 2, 2, 2, 7}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
A177536
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, down, down, up, down.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 4962, 39072, 346032, 3404160, 36853442, 435133488, 5566069380, 76676528112, 1131700250442, 17817052536384, 298034349244128, 5278625637077376, 98686282426953080, 1942087278998014400, 40130098178033129036, 868710371909527352944
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>6, 0, `if`(u+o+t<7, (u+o)!,
add(b(u-j, o+j-1, [1, 3, 4, 5, 1, 7][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 2, 2, 2, 6, 2][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 24 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 6, 0, If[u + o + t < 7, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 3, 4, 5, 1, 7}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 2, 2, 2, 6, 2}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
A177537
Number of permutations of {1,...,n} avoiding adjacent step pattern up, down, down, down, up, up.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 4985, 39440, 351000, 3470400, 37738800, 447766925, 5755249449, 79663786022, 1181466923370, 18690124534560, 314145239141775, 5590784473674106, 105025821614503735, 2076805450110696320, 43120601826854807940, 937944680532722764045
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(t>6, 0, `if`(u+o+t<7, (u+o)!,
add(b(u-j, o+j-1, [1, 3, 4, 5, 1, 3][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 2, 2, 2, 6, 7][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 24 2013
-
b[u_, o_, t_] := b[u, o, t] = If[t > 6, 0, If[u + o + t < 7, (u + o)!,
Sum[b[u - j, o + j - 1, {1, 3, 4, 5, 1, 3}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 2, 2, 2, 6, 7}[[t]]], {j, 1, o}]]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)