login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A231386 Number of permutations of [n] with exactly one occurrence of one of the consecutive step patterns UUD, UDU, DUU (U=up, D=down). 2
0, 0, 0, 0, 11, 52, 233, 1344, 8197, 49846, 351946, 2799536, 22764021, 200196218, 1947350444, 19753229932, 210793513246, 2425636703848, 29307938173409, 369141523106550, 4920501544208343, 68771635812423192, 998694091849893095, 15169308298544690802 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(n) ~ c * d^n * n! * n, where d = 0.63140578989563018836..., c = 1.015673... . - Vaclav Kotesovec, Aug 28 2014
EXAMPLE
a(4) = 11: 1243, 1342, 2341 (=UUD), 1324, 1423, 2314, 2413, 3412 (=UDU), 2134, 3124, 4123 (=DUU).
a(5) = 52: 12354, 12453, 12543, ..., 53124, 53412, 54123.
a(6) = 233: 123465, 123564, 123654, ..., 653124, 653412, 654123.
a(7) = 1344: 1234576, 1234675, 1234765, ..., 7653124, 7653412, 7654123.
MAPLE
b:= proc(u, o, t) option remember; `if`(t=13, 0, `if`(u+o=0,
`if`(t>6, 1, 0), add(b(u+j-1, o-j,
[2, 3, 3, 6, 12, 9, 8, 9, 9, 12, 13, 13][t]), j=1..o)+
add(b(u-j, o+j-1,
[4, 5, 11, 4, 4, 5, 10, 11, 13, 10, 10, 11][t]), j=1..u)))
end:
a:= n-> add(b(j-1, n-j, 1), j=1..n):
seq(a(n), n=0..30);
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[t==13, 0, If[u + o == 0, If[t > 6, 1, 0],
Sum[b[u+j-1, o-j,
{2, 3, 3, 6, 12, 9, 8, 9, 9, 12, 13, 13}[[t]]], {j, 1, o}] +
Sum[b[u-j, o+j-1,
{4, 5, 11, 4, 4, 5, 10, 11, 13, 10, 10, 11}[[t]]], {j, 1, u}]]];
a[n_] := Sum[b[j - 1, n - j, 1], {j, 1, n}];
a /@ Range[0, 30] (* Jean-François Alcover, Dec 22 2020, after Alois P. Heinz *)
CROSSREFS
Column k=1 of A231384.
Sequence in context: A317021 A199895 A304280 * A191099 A325727 A370502
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 08 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)