A177548
Number of permutations of {1,...,n} avoiding adjacent step pattern up, up, down, down, down, down.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5025, 40080, 359640, 3585600, 39322800, 470448000, 6097392939, 85106238492, 1272746220570, 20302567148160, 344103461618400, 6175195781293440, 116975122363277289, 2332451810975205960, 48833870901559002540, 1071107370496773577440
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, 1, 4, 5, 6, 7][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 3, 2, 2, 2][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 23 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, 1, 4, 5, 6, 7}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 3, 3, 2, 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 *)
A177549
Number of permutations of {1,...,n} avoiding adjacent step pattern up, up, down, down, up, up.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 4969, 39184, 347544, 3424320, 37150741, 439774085, 5639099103, 77873192126, 1152123776419, 18181366630226, 304851804959519, 5412206888619242, 101424438933572112, 2000731009697485843, 41440364401733715980, 899211137893661967405
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, 1, 4, 5, 1, 1][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 3, 2, 6, 7][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 23 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, 1, 4, 5, 1, 1}[[t]]], {j, 1, u}] + Sum[b[u+j-1, o-j, {2, 3, 3, 2, 6, 7}[[t]]], {j, 1, o}]]]; a[n_] := b[n, 0, 1]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 11 2016, after Alois P. Heinz *)
A177550
Number of permutations of {1,...,n} avoiding adjacent step pattern up, up, down, up, down, down.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 4950, 38880, 343440, 3369600, 36352800, 427680000, 5452027218, 74846801304, 1100895311340, 17272089457920, 287920937620800, 5081935953473280, 94681381716805374, 1856848184953043760, 38236452673395920040, 824863858830361247040
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, 1, 4, 1, 6, 7][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 3, 5, 3, 2][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 29 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, 1, 4, 1, 6, 7}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 3, 3, 5, 3, 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 *)
A177551
Number of permutations of {1,...,n} avoiding adjacent step pattern up, up, down, up, up, up.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5006, 39776, 355536, 3530880, 38581456, 459905790, 5938902464, 82590382604, 1230586598456, 19557934834104, 330265974019619, 5905113439990368, 111448391640387360, 2214092715361273978, 46185648021443324656, 1009303225985497077402
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, 1, 4, 1, 1, 4][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 3, 5, 6, 7][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 23 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, 1, 4, 1, 1, 4}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 3, 3, 5, 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 *)
A177552
Number of permutations of {1,...,n} avoiding adjacent step pattern up, up, up, down, down, down.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5020, 40000, 358560, 3571200, 39124800, 467596800, 6054250840, 84417778720, 1261161277200, 20097223449600, 340275330912000, 6100262355686400, 115437689217984148, 2299445555596421920, 48093671993708346480, 1053794989665442654080
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, 1, 1, 5, 6, 7][t]), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 4, 4, 2, 2][t]), j=1..o)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25); # Alois P. Heinz, Oct 30 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, 1, 1, 5, 6, 7}[[t]]], {j, 1, u}] +
Sum[b[u + j - 1, o - j, {2, 3, 4, 4, 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 *)
A254523
Number of permutations of [n] avoiding adjacent step pattern {up}^11.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001599, 6227020775, 87178290682, 1307674357710, 20922789683040, 355687423926240, 6402373618334400, 121645098513933120, 2432901965590252800, 51090941178938707200, 1124000703770606323200
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t<10, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
add(b(u-j, o+j-1, 0), j=1..u))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..30); # after Alois P. Heinz
-
CoefficientList[Series[6 / (Exp[-x] + Cos[x] + 2*Cos[x/2] * Cosh[Sqrt[3]*x/2] - Cosh[Sqrt[3]*x/2]*Sin[x/2] - Sin[x] + Cosh[x/2] * (2*Cos[Sqrt[3]*x/2] - Sqrt[3]*Sin[Sqrt[3]*x/2]) - Cos[Sqrt[3]*x/2]*Sinh[x/2] - Sqrt[3]*Cos[x/2]*Sinh[Sqrt[3]*x/2]), {x, 0, 25}], x] * Range[0, 25]!