A231601
Number of permutations of [n] avoiding ascents from odd to even numbers.
Original entry on oeis.org
1, 1, 1, 4, 8, 54, 162, 1536, 6144, 75000, 375000, 5598720, 33592320, 592950960, 4150656720, 84557168640, 676457349120, 15620794116480, 140587147048320, 3628800000000000, 36288000000000000, 1035338990313196800, 11388728893445164800, 355902198372945100800
Offset: 0
a(0) = 1: ().
a(1) = 1: 1.
a(2) = 1: 21.
a(3) = 4: 132, 213, 231, 321.
a(4) = 8: 1324, 2413, 2431, 3241, 4132, 4213, 4231, 4321.
a(5) = 54: 13245, 13254, 13524, ..., 54213, 54231, 54321.
a(6) = 162: 132465, 132546, 132645, ..., 654213, 654231, 654321.
Bisection gives:
A061711 (even part).
A285672
Number of permutations p of [n] avoiding consecutive odd sums i+p(i), (i+1)+p(i+1) for all i in [n-1].
Original entry on oeis.org
1, 1, 1, 2, 8, 36, 180, 1008, 6336, 46080, 374400, 3369600, 32659200, 344736000, 3886444800, 47348582400, 611264102400, 8442272563200, 122595843686400, 1890952003584000, 30510694932480000, 520011800985600000, 9231875243458560000, 172292221923655680000
Offset: 0
a(0) = 1: the empty permutation.
a(1) = 1: 1.
a(2) = 1: 12.
a(3) = 2: 123, 321.
a(4) = 8: 1234, 1432, 2413, 2431, 3214, 3412, 4213, 4231.
a(5) = 36: 12345, 12543, 13524, 13542, 14325, 14523, 15324, 15342, 24135, 24153, 24315, 24351, 24513, 24531, 31524, 31542, 32145, 32541, 34125, 34521, 35124, 35142, 42135, 42153, 42315, 42351, 42513, 42531, 51324, 51342, 52143, 52341, 53124, 53142, 54123, 54321.
-
b:= proc(n, i, j, p, t) option remember; `if`(n=0, 1,
`if`(i=0 or t=1 and p=1, 0, i*b(n-1, i-1, j, 1-p, p))+
`if`(j=0 or t=1 and p=0, 0, j*b(n-1, i, j-1, 1-p, 1-p)))
end:
a:= n-> b(n, floor(n/2), ceil(n/2), 1, 0):
seq(a(n), n=0..25);
-
b[n_, i_, j_, p_, t_] := b[n, i, j, p, t] =
If[n==0, 1, If[i==0 || t ==1 && p==1, 0, i*b[n-1, i-1, j, 1-p, p]] +
If[j==0 || t==1 && p==0, 0, j*b[n-1, i, j-1, 1-p, 1-p]]];
a[n_] := b[n, Floor[n/2], Ceiling[n/2], 1, 0];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Aug 30 2021, after Alois P. Heinz *)
A052850
E.g.f.: x/(1-x)+log((1-x)/(1-2*x)).
Original entry on oeis.org
0, 2, 5, 20, 114, 864, 8280, 96480, 1325520, 20966400, 374855040, 7468070400, 163938297600, 3929729126400, 102104460057600, 2857878742118400, 85719362496768000, 2742726680838144000, 93247371837075456000, 3356802948155424768000, 127556444063199191040000
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
-
spec := [S,{B=Sequence(Z,1 <= card),C=Cycle(B),S=Union(B,C)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
a:= n-> `if`(n=0, 0, (2^n+n-1)*(n-1)!): seq(a(n), n=0..25); # Alois P. Heinz, Nov 09 2011
-
CoefficientList[Series[x/(1-x)+Log[(1-x)/(1-2*x)], {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 01 2013 *)
A232187
Number T(n,k) of parity alternating permutations of [n] with exactly k descents from odd to even numbers; triangle T(n,k), n>=0, 0<=k<=max(0,floor((n-1)/2)), read by rows.
Original entry on oeis.org
1, 1, 2, 1, 1, 5, 3, 2, 8, 2, 20, 44, 8, 6, 66, 66, 6, 114, 594, 414, 30, 24, 624, 1584, 624, 24, 864, 8784, 14544, 4464, 144, 120, 6840, 36240, 36240, 6840, 120, 8280, 147720, 471120, 353520, 55320, 840, 720, 86400, 857520, 1739520, 857520, 86400, 720, 96480
Offset: 0
T(5,0) = 2: 12345, 34125.
T(5,1) = 8: 12543, 14325, 14523, 32145, 34521, 52143, 52341, 54123.
T(5,2) = 2: 32541, 54321.
T(6,2) = 8: 163254, 165432, 321654, 325416, 541632, 543216, 632541, 654321.
T(7,0) = 6: 1234567, 1256347, 3412567, 3456127, 5612347, 5634127.
T(7,1) = 66: 1234765, 1236547, 1236745, ..., 7456123, 7612345, 7634125.
T(7,2) = 66: 1254763, 1276543, 1432765, ..., 7652143, 7652341, 7654123.
T(7,3) = 6: 3254761, 3276541, 5432761, 5476321, 7632541, 7654321.
Triangle T(n,k) begins:
: 0 : 1;
: 1 : 1;
: 2 : 2;
: 3 : 1, 1;
: 4 : 5, 3;
: 5 : 2, 8, 2;
: 6 : 20, 44, 8;
: 7 : 6, 66, 66, 6;
: 8 : 114, 594, 414, 30;
: 9 : 24, 624, 1584, 624, 24;
: 10 : 864, 8784, 14544, 4464, 144;
: 11 : 120, 6840, 36240, 36240, 6840, 120;
Showing 1-4 of 4 results.
Comments