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!)
A367336 Number of permutations p of [n] such that p(i), p(i+3), p(i+6),... form an up-down sequence for i in {1,2,3}. 2
1, 1, 2, 6, 12, 30, 90, 420, 2240, 13440, 84000, 577500, 4331250, 36036000, 322882560, 3099672576, 31513337856, 340409701632, 3893435962416, 47122428697344, 600341948743680, 8030803773358080, 112453396587417600, 1646232972560748000, 25147419121286426250 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Number of permutations p of [n] such that p(i) < p(i+3) > p(i+6) < ... for i <= 3.
LINKS
EXAMPLE
a(4) = 12: 1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, 2314, 2413, 3124, 3214.
a(5) = 30: 12345, 12354, 12435, 12453, 12534, 12543, 13245, 13254, 13425, 13524, 14235, 14325, 21345, 21354, 21435, 21453, 21534, 21543, 23145, 23154, 24135, 31245, 31254, 31452, 31542, 32145, 32154, 41253, 41352, 42153.
MAPLE
b:= proc(u, o) option remember;
`if`(u+o=0, 1, add(b(o-1+j, u-j), j=1..u))
end:
a:= n-> (l-> combinat[multinomial](n, l[])*mul(
b(s, 0), s=l))([floor((n+i)/3)$i=0..2]):
seq(a(n), n=0..27);
MATHEMATICA
multinomial[n_, k_List] := n!/Times @@ (k!);
b[u_, o_] := b[u, o] = If[u+o == 0, 1, Sum[b[o-1+j, u-j], {j, 1, u}]];
a[n_] := Function[l, Product[b[s, 0], {s, l}]*multinomial[n, l]][Table[ Floor[(n+i)/3], {i, 0, 2}]];
Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Nov 27 2023, after Alois P. Heinz *)
CROSSREFS
Column k=3 of A361651.
Sequence in context: A320664 A022916 A073949 * A080372 A335287 A322804
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 14 2023
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 August 6 20:52 EDT 2024. Contains 374983 sequences. (Running on oeis4.)