A180056
The number of permutations of {1,2,...,2n} with n ascents.
Original entry on oeis.org
1, 1, 11, 302, 15619, 1310354, 162512286, 27971176092, 6382798925475, 1865385657780650, 679562217794156938, 301958232385734088196, 160755658074834738495566, 101019988341178648636047412, 73990373947612503295166622044, 62481596875767023932367207962680
Offset: 0
-
A180056 :=
proc(n) local j;
add((-1)^j*binomial(2*n+1,j)*(n-j+1)^(2*n),j=0..n)
end:
# A180056_list(m) returns [a_0,a_1,..,a_m]
A180056_list :=
proc(m) local A, R, M, n, k;
R := 1; M := m + 1;
A := array([seq(1, n = 1..M)]);
for n from 2 to M do
for k from 2 to M do
if n = k then R := R, A[k] fi;
A[k] := n*A[k-1] + k*A[k]
od
od;
R
end:
-
A025585[n_] := Sum[(-1)^j*(n-j)^(2*n-1)*Binomial[2*n, j], {j, 0, n}]; a[0] = 1; a[n_] := A025585[n+1]/(2*n+2); Table[a[n], {n, 0, 13}] (* Jean-François Alcover, Jun 28 2013, after Gary Detlefs *)
<< Combinatorica`; Table[Combinatorica`Eulerian[2 n, n], {n, 0, 20}] (* Vladimir Reshetnikov, Oct 15 2016 *)
-
def A180056_list(m):
ret = [1]
M = m + 1
A = [1 for i in range(0, M)]
for n in range(2, M):
for k in range(2, M):
if n == k:
ret.append(A[k])
A[k] = n*A[k-1] + k*A[k]
return ret
A303285
Number of permutations p of [2n] such that the sequence of ascents and descents of p0 forms a Dyck path.
Original entry on oeis.org
1, 1, 8, 172, 7296, 518324, 55717312, 8460090160, 1726791794432, 456440969661508, 151770739970889792, 62022635037246022000, 30564038464166725328768, 17876875858414492985045712, 12245573879235563308351042496, 9711714975145772145881269175104
Offset: 0
a(0) = 1: the empty permutation.
a(1) = 1: 12.
a(2) = 8: 1243, 1324, 1342, 1423, 2314, 2341, 2413, 3412.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t>0, add(b(u-j, o+j-1, t-1), j=1..u), 0)+
`if`(o+u>t, add(b(u+j-1, o-j, t+1), j=1..o), 0))
end:
a:= n-> b(0, 2*n, 0):
seq(a(n), n=0..20);
-
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t > 0, Sum[b[u - j, o + j - 1, t - 1], {j, 1, u}], 0] + If[o + u > t, Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}], 0]];
a[n_] := b[0, 2n, 0];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 29 2018, from Maple *)
-
\\ here b(n) is A177042
b(n)={if(n==0, 1, 2*sum(k=0, n, (-1)^k*binomial(2*n+1,k)*(n-k+1)^(2*n)));}
a(n)={if(n==0, 1, sum(k=1, n, binomial(2*n, 2*k-1)*b(k-1)*b(n-k))/2);} \\ Andrew Howroyd, Nov 01 2018
A303287
Number of permutations p of [n] such that the sequence of ascents and descents of p or of p0 (if n is even) forms a Dyck path.
Original entry on oeis.org
1, 1, 1, 2, 8, 22, 172, 604, 7296, 31238, 518324, 2620708, 55717312, 325024572, 8460090160, 55942352184, 1726791794432, 12765597850950, 456440969661508, 3730771315561300, 151770739970889792, 1359124435588313876, 62022635037246022000, 603916464771468176392
Offset: 0
a(0) = 1: the empty permutation.
a(1) = 1: 1.
a(2) = 1: 12.
a(3) = 2: 132, 231.
a(4) = 8: 1243, 1324, 1342, 1423, 2314, 2341, 2413, 3412.
a(5) = 22: 12543, 13254, 13542, 14253, 14352, 14532, 15243, 15342, 23154, 23541, 24153, 24351, 24531, 25143, 25341, 34152, 34251, 34521, 35142, 35241, 45132, 45231.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t>0, add(b(u-j, o+j-1, t-1), j=1..u), 0)+
`if`(o+u>t, add(b(u+j-1, o-j, t+1), j=1..o), 0))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..25);
-
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t > 0, Sum[b[u - j, o + j - 1, t - 1], {j, 1, u}], 0] + If[o + u > t, Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}], 0]];
a[n_] := b[n, 0, 1];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 25 2018, translated from Maple *)
A303286
Number of permutations p of [2n+1] such that the sequence of ascents and descents of 0p0 forms a Dyck path.
Original entry on oeis.org
1, 4, 60, 1974, 114972, 10490392, 1384890104, 250150900354, 59317740001132, 17886770092245360, 6687689652133397064, 3037468107154650475868, 1647659575564603380270360, 1052309674407466474533397824, 781725844087366504901991503920, 668408235613132734111402947167658
Offset: 0
a(1) = 4: 132, 213, 231, 312.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t>0, add(b(u-j, o+j-1, t-1), j=1..u), 0)+
`if`(o+u>t, add(b(u+j-1, o-j, t+1), j=1..o), 0))
end:
a:= n-> b(0, 2*n+1, 0):
seq(a(n), n=0..20);
-
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t > 0, Sum[b[u - j, o + j - 1, t - 1], {j, 1, u}], 0] + If[o + u > t, Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}], 0]];
a[n_] := b[0, 2*n + 1, 0];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 31 2018, from Maple *)
Showing 1-4 of 4 results.
Comments