login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228408 Number of permutations of [n] with exactly two (possibly overlapping) occurrences of some of the consecutive step patterns UUD, UDU, DUU (U=up, D=down). 2
0, 0, 0, 0, 0, 29, 230, 1537, 11208, 89657, 724755, 6010150, 55305521, 545054759, 5504044595, 59482056555, 690974195737, 8306302563795, 104653460921783, 1401318441726295, 19525683104731681, 282626170020405627, 4296152288224050974, 67974610534037861728 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

COMMENTS

The counted patterns are: 1243, 1342, 2341 (=UUD), 1324, 1423, 2314, 2413, 3412 (=UDU), 2134, 3124, 4123 (=DUU).

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..185

EXAMPLE

a(5) = 29: 12435, 12534, 13245, 13425, 13524, 14235, 14523, 15234, 21354, 21453, 23145, 23415, 23514, 24135, 24513, 25134, 31254, 31452, 32451, 34125, 34512, 35124, 41253, 41352, 42351, 45123, 51243, 51342, 52341.

a(6) = 230: 123546, 123645, 124365, ..., 651243, 651342, 652341.

a(7) = 1537: 1234657, 1234756, 1235476, ..., 7651243, 7651342, 7652341.

MAPLE

b:= proc(u, o, t, c) option remember;

      `if`(c<0, 0, `if`(u+o=0, `if`(c=0, 1, 0),

      add(b(u+j-1, o-j, [2, 3, 3, 6, 6, 3][t],

              `if`(t in [5, 6], c-1, c)), j=1..o)+

      add(b(u-j, o+j-1, [4, 5, 5, 4, 4, 5][t],

              `if`(t=3, c-1, c)), j=1..u)))

    end:

a:= n-> add(b(j-1, n-j, 1, 2), j=1..n):

seq(a(n), n=0..25);

CROSSREFS

Column k=2 of A231384.

Sequence in context: A244767 A146421 A093401 * A042636 A091630 A251424

Adjacent sequences:  A228405 A228406 A228407 * A228409 A228410 A228411

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Nov 09 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 25 01:39 EST 2020. Contains 331229 sequences. (Running on oeis4.)