A008518
Triangle of Eulerian numbers with rows multiplied by 1 + x.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 5, 5, 1, 1, 12, 22, 12, 1, 1, 27, 92, 92, 27, 1, 1, 58, 359, 604, 359, 58, 1, 1, 121, 1311, 3607, 3607, 1311, 121, 1, 1, 248, 4540, 19912, 31238, 19912, 4540, 248, 1, 1, 503, 15110, 102842, 244424, 244424, 102842, 15110, 503, 1
Offset: 0
Triangle begins:
1;
1, 1;
1, 2, 1;
1, 5, 5, 1;
1, 12, 22, 12, 1;
1, 27, 92, 92, 27, 1;
1, 58, 359, 604, 359, 58, 1;
1, 121, 1311, 3607, 3607, 1311, 121, 1;
...
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 243.
- R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 254.
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 215.
-
Eulerian:= func< n, k | (&+[(-1)^j*Binomial(n+1, j)*(k-j+1)^n: j in [0..k+1]]) >;
[Eulerian(n, k-1) + Eulerian(n, k): k in [0..n], n in [0..10]]; // G. C. Greubel, Jun 18 2024
-
t[n_ /; n >= 0, 0] = 1; t[n_, k_] /; k<0 || k>n = 0; t[n_, k_] := t[n, k] = (n-k) t[n-1, k-1] + (k+1) t[n-1, k];
A[n_, k_] /; k == n+1 = 0; A[n_, k_] := t[n, n-k];
T[n_, k_] := A[n, k] + A[n, k+1];
Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 26 2019, after Franck Maminirina Ramaharo *)
-
def Eulerian(n,k): return sum((-1)^j*binomial(n+1, j)*(k-j+1)^n for j in range(k+2))
flatten([[Eulerian(n,k-1) + Eulerian(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jun 18 2024
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 *)
A316728
Number T(n,k) of permutations of {0,1,...,2n} with first element k whose sequence of ascents and descents forms a Dyck path; triangle T(n,k), n>=0, 0<=k<=2n, read by rows.
Original entry on oeis.org
1, 1, 1, 0, 8, 7, 5, 2, 0, 172, 150, 121, 87, 52, 22, 0, 7296, 6440, 5464, 4411, 3337, 2306, 1380, 604, 0, 518324, 463578, 405024, 344260, 283073, 223333, 166856, 115250, 69772, 31238, 0, 55717312, 50416894, 44928220, 39348036, 33777456, 28318137, 23068057, 18117190, 13543456, 9409366, 5759740, 2620708, 0
Offset: 0
T(2,0) = 8: 01432, 02143, 02431, 03142, 03241, 03421, 04132, 04231.
T(2,1) = 7: 12043, 12430, 13042, 13240, 13420, 14032, 14230.
T(2,2) = 5: 23041, 23140, 23410, 24031, 24130.
T(2,3) = 2: 34021, 34120.
T(2,4) = 0.
Triangle T(n,k) begins:
1;
1, 1, 0;
8, 7, 5, 2, 0;
172, 150, 121, 87, 52, 22, 0;
7296, 6440, 5464, 4411, 3337, 2306, 1380, 604, 0;
518324, 463578, 405024, 344260, 283073, 223333, 166856, 115250, 69772, 31238, 0;
Row sums and T(n+1,2n+1) give
A177042.
-
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:
T:= (n, k)-> b(k, 2*n-k, 0):
seq(seq(T(n, k), k=0..2*n), n=0..8);
-
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]];
T[n_, k_] := b[k, 2n - k, 0];
Table[Table[T[n, k], {k, 0, 2n}], {n, 0, 8}] // Flatten (* Jean-François Alcover, Mar 27 2021, after Alois P. Heinz *)
Original entry on oeis.org
1, 26, 2741, 683870, 315704418, 234725594388, 257237392999893, 390832857108454838, 787178784737043042806, 2031210797603911366282796, 6536955866068372922068141666, 25676217636579568989377656129516, 120915166829869713032692550819662756, 672580820552232143302651758669053327784
Offset: 1
-
T[n_, k_, m_]:= T[n,k,m]= If[k==1 || k==n, 1, (m*n-m*k+1)*T[n-1,k-1,m] + (m*k-m+ 1)*T[n-1,k,m]];
a[n_]:= 2*T[2*n,n,3]/(n+1);
Table[a[n], {n,30}] (* modified by G. C. Greubel, Mar 14 2022 *)
-
@CachedFunction
def T(n,k,m): # A142458
if (k==1 or k==n): return 1
else: return (m*(n-k)+1)*T(n-1,k-1,m) + (m*k-m+1)*T(n-1,k,m)
[2*T(2*n,n,3)/(n+1) for n in (1..30)] # G. C. Greubel, Mar 14 2022
Name corrected and more terms added by
G. C. Greubel, Mar 14 2022
A321280
Number T(n,k) of permutations p of [n] with exactly k descents such that the up-down signature of p has nonnegative partial sums; triangle T(n,k), n>=0, 0<=k<=max(0,floor((n-1)/2)), read by rows.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 8, 1, 22, 22, 1, 52, 172, 1, 114, 856, 604, 1, 240, 3488, 7296, 1, 494, 12746, 54746, 31238, 1, 1004, 43628, 330068, 518324, 1, 2026, 143244, 1756878, 5300418, 2620708, 1, 4072, 457536, 8641800, 43235304, 55717312, 1, 8166, 1434318, 40298572, 309074508, 728888188, 325024572
Offset: 0
Triangle T(n,k) begins:
1;
1;
1;
1, 2;
1, 8;
1, 22, 22;
1, 52, 172;
1, 114, 856, 604;
1, 240, 3488, 7296;
1, 494, 12746, 54746, 31238;
1, 1004, 43628, 330068, 518324;
1, 2026, 143244, 1756878, 5300418, 2620708;
1, 4072, 457536, 8641800, 43235304, 55717312;
1, 8166, 1434318, 40298572, 309074508, 728888188, 325024572;
1, 16356, 4438540, 180969752, 2026885824, 7589067592, 8460090160;
...
- Alois P. Heinz, Rows n = 0..100, flattened
- S. Spiro, Ballot Permutations, Odd Order Permutations, and a New Permutation Statistic, arXiv preprint arXiv:1810.00993 [math.CO], 2018.
- David G. L. Wang, T. Zhao, The peak and descent statistics over ballot permutations, arXiv:2009.05973 [math.CO], 2020.
-
b:= proc(u, o, c) option remember; `if`(c<0, 0, `if`(u+o=0, 1/x,
add(expand(x*b(u-j, o-1+j, c-1)), j=1..u)+
add(b(u+j-1, o-j, c+1), j=1..o)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(`if`(n=0, 1, b(n, 0, 1))):
seq(T(n), n=0..14);
-
b[u_, o_, c_] := b[u, o, c] = If[c < 0, 0, If[u + o == 0, 1/x, Sum[Expand[ x*b[u - j, o - 1 + j, c - 1]], {j, 1, u}] + Sum[b[u + j - 1, o - j, c + 1], {j, 1, o}]]];
T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ If[n == 0, 1, b[n, 0, 1]]];
Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 08 2018, after Alois P. Heinz *)
A321268
Number of permutations on [n] whose up-down signature has nonnegative partial sums and which have exactly two descents.
Original entry on oeis.org
0, 0, 0, 0, 22, 172, 856, 3488, 12746, 43628, 143244, 457536, 1434318, 4438540, 13611136, 41473216, 125797010, 380341580, 1147318004, 3455325600, 10394291094, 31242645420, 93853769320, 281825553760, 846030314842, 2539248578732, 7620161662556, 22865518160768
Offset: 1
Some permutations counted by a(5) include 14253 and 34521.
- Sam Spiro, Table of n, a(n) for n = 1..100
- S. Spiro, Ballot Permutations, Odd Order Permutations, and a New Permutation Statistic, arXiv:1810.00993 [math.CO], 2018.
- Index entries for linear recurrences with constant coefficients, signature (11,-50,122,-173,143,-64,12).
-
a[1] = 0; a[n_] := 2n^2 - 2n - 1 - n 2^(n-1) - 2 Binomial[n, 3] + Sum[ Binomial[n, k] (2^k - 2k), {k, 0, n}];
Table[a[n], {n, 1, 28}] (* Jean-François Alcover, Nov 11 2018 *)
-
a(n)={if(n<2, 0, 2*n^2 - 2*n - 1 - n*2^(n-1) - 2*binomial(n,3) + sum(k=0, n, binomial(n, k)*(2^k - 2*k)))} \\ Andrew Howroyd, Nov 01 2018
-
concat([0,0,0,0], Vec(2*x^5*(11 - 35*x + 32*x^2 - 6*x^3) / ((1 - x)^4*(1 - 2*x)^2*(1 - 3*x)) + O(x^40))) \\ Colin Barker, Mar 07 2019
A321269
Number of permutations on [n] whose up-down signature has nonnegative partial sums and which have exactly three descents.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 604, 7296, 54746, 330068, 1756878, 8641800, 40298572, 180969752, 790697160, 3385019968, 14270283414, 59457742524, 245507935018, 1006678811272, 4105447763032, 16672235476128, 67482738851220, 272439143364672, 1097660274098482, 4415486996246052
Offset: 1
The permutations counted by a(7) include 1237654 and 17265243.
- Alois P. Heinz, Table of n, a(n) for n = 1..1660
- S. Spiro, Ballot Permutations, Odd Order Permutations, and a New Permutation Statistic, arXiv preprint arXiv:1810.00993 [math.CO], 2018.
- Index entries for linear recurrences with constant coefficients, signature (24,-260,1684,-7278,22172,-49004,79596,-95065,82508,-50616,20800,-5136,576).
-
t[n_, k_] := Sum[(-1)^j (k - j)^n Binomial[n + 1, j], {j, 0, k}];
a[n_] := If[n<7, 0, 4 t[n-1, 4] - (Binomial[n, 3] - Binomial[n, 2] + 4) * 2^(n-2) - 22 Binomial[n, 5] + 16 Binomial[n, 4] - 4 Binomial[n, 3] + 2n];
Array[a, 30] (* Jean-François Alcover, Feb 29 2020, from Sam Spiro's 1st formula *)
-
concat([0,0,0,0,0,0], Vec(2*x^7*(302 - 3600*x + 18341*x^2 - 52006*x^3 + 89327*x^4 - 94728*x^5 + 61016*x^6 - 23368*x^7 + 5424*x^8 - 576*x^9) / ((1 - x)^6*(1 - 2*x)^4*(1 - 3*x)^2*(1 - 4*x)) + O(x^30))) \\ Colin Barker, Mar 07 2019
Original entry on oeis.org
1, -4, -40, 672, 8064, -253440, -3294720, 153753600, 2091048960, -130025226240, -1820353167360, 141707492720640, 2024392753152000, -189483161695027200, -2747505844577894400, 300609462994993152000, 4408938790593232896000
Offset: 0
-
(* First program *)
p[x_, n_] = HermiteH[n, x] + ExpandAll[x^n*HermiteH[n, 1/x]];
b:= Table[CoefficientList[p[x, n], x], {n, 0, 50}];
Table[b[[2*n+2, n+1]]/(n+2), {n,0,20}]
(* Second program *)
A060821[n_, k_]:= If[EvenQ[n-k], (-1)^(Floor[(n-k)/2])*2^k*n!/(k!*(Floor[(n - k)/2]!)), 0];
a[n_]:= (A060821[2*n+1, n] + A060821[2*n+1, n+1])/(n+2);
Table[a[n], {n, 0, 25}] (* G. C. Greubel, Apr 04 2021 *)
-
def A060821(n,k): return (-1)^((n-k)//2)*2^k*factorial(n)/(factorial(k)*factorial( (n-k)//2)) if (n-k)%2==0 else 0
def a(n): return (A060821(2*n+1, n) + A060821(2*n+1, n+1))/(n+2)
[a(n) for n in (0..25)] # G. C. Greubel, Apr 04 2021
A141693
Triangle read by rows: T(n,k) = (2*k - n)*A008292(n,k) with T(n,n) = n, 0 <= k <= n, where A008292 is the triangle of Eulerian numbers.
Original entry on oeis.org
0, -1, 1, -2, 0, 2, -3, -4, 1, 3, -4, -22, 0, 2, 4, -5, -78, -66, 26, 3, 5, -6, -228, -604, 0, 114, 4, 6, -7, -600, -3573, -2416, 1191, 360, 5, 7, -8, -1482, -17172, -31238, 0, 8586, 988, 6, 8, -9, -3514, -73040, -264702, -156190, 88234, 43824, 2510, 7, 9, -10
Offset: 0
Triangle begins:
0;
-1, 1;
-2, 0, 2;
-3, -4, 1, 3;
-4, -22, 0, 2, 4;
-5, -78, -66, 26, 3, 5;
-6, -228, -604, 0, 114, 4, 6;
-7, -600, -3573, -2416, 1191, 360, 5, 7;
-8, -1482, -17172, -31238, 0, 8586, 988, 6, 8;
-9, -3514, -73040, -264702, -156190, 88234, 43824, 2510, 7, 9;
...
-
T:= proc(n,k) `if`(n=k,n,(2*k-n)*add((-1)^j*(k-j+1)^n*binomial(n+1,j),j=0..k)); end proc: seq(seq(T(n,k),k=0..n),n=0..10); # Muniru A Asiru, Oct 06 2018
T := (n, k) -> `if`(n = k, n, (2*k - n)*combinat:-eulerian1(n,k)):
seq(seq(T(n,k), k=0..n), n=0..9); # Peter Luschny, Oct 06 2018
-
T[n_, k_] = If[n == k, n, (2*k - n)*Sum[(-1)^j*(k - j + 1)^n*Binomial[n + 1, j], {j, 0, k}]];
Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}]//Flatten
-
T(n, k) := if n = k then n else (2*k - n)*sum((-1)^j*(k - j + 1)^n*binomial(n + 1, j), j, 0, k)$
tabl(nn) := for n:0 thru nn do print(makelist(T(n, k), k, 0, n))$ /* Franck Maminirina Ramaharo, Oct 05 2018 */
Showing 1-10 of 10 results.
Comments