login
A231385
Number of permutations of [n] avoiding simultaneously consecutive step patterns UUD, UDU, DUU (U=up, D=down).
2
1, 1, 2, 6, 13, 39, 158, 674, 3304, 19511, 122706, 834131, 6416525, 52909708, 462097526, 4395014406, 44626369587, 476351029850, 5414386451909, 65177788719791, 821378978885730, 10880928171304446, 151423268838929524, 2197946731864495343, 33278572455563069142
OFFSET
0,3
COMMENTS
The avoided patterns are: 1243, 1342, 2341 (=UUD), 1324, 1423, 2314, 2413, 3412 (=UDU), 2134, 3124, 4123 (=DUU).
FORMULA
a(n) ~ c * d^n * n!, where d = 0.63140578989563018836..., c = 3.3290259175437715006... . - Vaclav Kotesovec, Aug 28 2014
EXAMPLE
a(4) = 13: 1234, 1432, 2143, 2431, 3142, 3214, 3241, 3421, 4132, 4213, 4231, 4312, 4321.
a(5) = 39: 12345, 14325, 15324, ..., 54231, 54312, 54321.
a(6) = 158: 123456, 143265, 153264, ..., 654231, 654312, 654321.
MAPLE
b:= proc(u, o, t) option remember; `if`(t=7, 0, `if`(u+o=0, 1,
add(b(u+j-1, o-j, [2, 3, 3, 6, 7, 7][t]), j=1..o)+
add(b(u-j, o+j-1, [4, 5, 7, 4, 4, 5][t]), j=1..u)))
end:
a:= n-> `if`(n=0, 1, add(b(j-1, n-j, 1), j=1..n)):
seq(a(n), n=0..25);
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[t == 7, 0, If[u + o == 0, 1,
Sum[b[u + j - 1, o - j, {2, 3, 3, 6, 7, 7}[[t]]], {j, 1, o}] +
Sum[b[u - j, o + j - 1, {4, 5, 7, 4, 4, 5}[[t]]], {j, 1, u}]]];
a[n_] := If[n == 0, 1, Sum[b[j - 1, n - j, 1], {j, 1, n}]];
a /@ Range[0, 25] (* Jean-François Alcover, Dec 22 2020, after Alois P. Heinz *)
CROSSREFS
Column k=0 of A231384.
Sequence in context: A319751 A124124 A052450 * A001373 A320804 A284223
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 08 2013
STATUS
approved