cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 11 results. Next

A123125 Triangle of Eulerian numbers T(n,k), 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 4, 1, 0, 1, 11, 11, 1, 0, 1, 26, 66, 26, 1, 0, 1, 57, 302, 302, 57, 1, 0, 1, 120, 1191, 2416, 1191, 120, 1, 0, 1, 247, 4293, 15619, 15619, 4293, 247, 1, 0, 1, 502, 14608, 88234, 156190, 88234, 14608, 502, 1, 0, 1, 1013, 47840, 455192, 1310354, 1310354, 455192, 47840, 1013, 1
Offset: 0

Views

Author

Philippe Deléham, Sep 30 2006

Keywords

Comments

The beginning of this sequence does not quite agree with the usual version, which is A173018. - N. J. A. Sloane, Nov 21 2010
Each row of A123125 is the reverse of the corresponding row in A173018. - Michael Somos, Mar 17 2011
A008292 (subtriangle for k>=1 and n>=1) is the main entry for these numbers.
Triangle T(n,k), 0 <= k <= n, read by rows given by [0,1,0,2,0,3,0,4,0,5,0,...] DELTA [1,0,2,0,3,0,4,0,5,0,6,...] where DELTA is the operator defined in A084938.
Row sums are the factorials. - Roger L. Bagula and Gary W. Adamson, Aug 14 2008
If the initial zero column is deleted, the result is A008292. - Roger L. Bagula and Gary W. Adamson, Aug 14 2008
This result gives an alternative method of calculating the Eulerian numbers by an Umbral Calculus expansion from Comtet. - Roger L. Bagula, Nov 21 2009
This function seems to be equivalent to the PolyLog expansion. - Roger L. Bagula, Nov 21 2009
A raising operator formed from the e.g.f. of this entry is the generator of a sequence of polynomials p(n,x;t) defined in A046802 that specialize to those for A119879 as p(n,x;-1), A007318 as p(n,x;0), A073107 as p(n,x;1), and A046802 as p(n,0;t). See Copeland link for more associations. - Tom Copeland, Oct 20 2015
The Eulerian numbers in this setup count the permutation trees of power n and width k (see the Luschny link). For the associated combinatorial statistic over permutations see the Sage program below and the example section. - Peter Luschny, Dec 09 2015 [See Elder et al. link. Peter Luschny, Jul 13 2022]
From Wolfdieter Lang, Apr 03 2017: (Start)
The row polynomials R(n, x) = Sum_{k=0..n} T(n, k)*x^k are the numerator polynomials of the o.g.f. G(n, x) of n-powers {m^n}_{m>=0} (with 0^0 = 1): G(n, x) = R(n, x)/(1-x)^(n+1). See the Aug 14 2008 formula, where f(x,n) = R(n, x). The e.g.f. of R(n, t) is given in Copeland's Oct 14 2015 formula below.
The first nine column sequences are A000007, A000012, A000295, A000460, A000498, A000505, A000514, A001243, A001244. (End)
With all offsets 0, let A_n(x;y) = (y + E.(x))^n, an Appell sequence in y where E.(x)^k = E_k(x) are the Eulerian polynomials of this entry, A123125. Then the row polynomials of A046802 (the h-polynomials of the stellahedra) are given by h_n(x) = A_n(x;1); the row polynomials of A248727 (the face polynomials of the stellahedra), by f_n(x) = A_n(1 + x;1); the Swiss-knife polynomials of A119879, by Sw_n(x) = A_n(-1;1 + x); and the row polynomials of the Worpitsky triangle (A130850), by w_n(x) = A(1 + x;0). Other specializations of A_n(x;y) give A090582 (the f-polynomials of the permutohedra, cf. also A019538) and A028246 (another version of the Worpitsky triangle). - Tom Copeland, Jan 24 2020
Let b(n) = (1/(n+1))*Sum_{k=0..n-1} (-1)^(n-k+1)*T(n, k+1) / binomial(n, k+1). Then b(n) = Bernoulli(n, 1) = -n*Zeta(1 - n) = Integral_{x=0..1} F_n(x) for n >= 1. Here F_n(x) are the signed Fubini polynomials (A278075). (See also Rzadkowski and Urlinska, example 1.) - Peter Luschny, Feb 15 2021
Patrick J. Burchell (see link) describes the following method: To get the k-th row of the triangle write the nonnegative integers with a fixed exponent k as a sequence, 0^k, 1^k, 2^k, ..., and then apply the first differences to them k + 1 times. - Peter Luschny, Apr 02 2023

Examples

			The triangle T(n, k) begins:
  n\k 0 1    2     3      4       5       6      7     8    9 10...
  0:  1
  1:  0 1
  2:  0 1    1
  3:  0 1    4     1
  4:  0 1   11    11      1
  5:  0 1   26    66     26       1
  6:  0 1   57   302    302      57       1
  7:  0 1  120  1191   2416    1191     120      1
  8:  0 1  247  4293  15619   15619    4293    247     1
  9:  0 1  502 14608  88234  156190   88234  14608   502    1
 10:  0 1 1013 47840 455192 1310354 1310354 455192 47840 1013  1
...  Reformatted. - _Wolfdieter Lang_, Feb 14 2015
------------------------------------------------------------------
The width statistic over permutations, n=4.
  [1, 2, 3, 4] => 3; [1, 2, 4, 3] => 2; [1, 3, 2, 4] => 2; [1, 3, 4, 2] => 2;
  [1, 4, 2, 3] => 2; [1, 4, 3, 2] => 1; [2, 1, 3, 4] => 3; [2, 1, 4, 3] => 2;
  [2, 3, 1, 4] => 2; [2, 3, 4, 1] => 3; [2, 4, 1, 3] => 2; [2, 4, 3, 1] => 2;
  [3, 1, 2, 4] => 3; [3, 1, 4, 2] => 3; [3, 2, 1, 4] => 2; [3, 2, 4, 1] => 3;
  [3, 4, 1, 2] => 3; [3, 4, 2, 1] => 2; [4, 1, 2, 3] => 4; [4, 1, 3, 2] => 3;
  [4, 2, 1, 3] => 3; [4, 2, 3, 1] => 3; [4, 3, 1, 2] => 3; [4, 3, 2, 1] => 2;
Gives row(4) = [0, 1, 11, 11, 1]. - _Peter Luschny_, Dec 09 2015
------------------------------------------------------------------
From _Wolfdieter Lang_, Apr 03 2017: (Start)
Recurrence: T(5, 3) = (6-3)*T(4, 2) + 3*T(4, 3) = 3*11 + 3*11 = 66.
O.g.f. column k=2: (x/(1 - 2*x))*E_x*(x/(1-x)) = (x/(1-x))^2/(1-2*x).
E.g.f. column k=2: A(2, x) = x*A(1, x) + x*E(1, x) = x*1 + x*(exp(x)-1) = x*exp(x), hence E(2, x) = (1 + int(x*exp(-x),x ))*exp(2*x) = exp(x)*(exp(x) - (1+x)). See A000295. (End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, Holland, 1978, page 245. [Roger L. Bagula, Nov 21 2009]
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics, 2nd ed.; Addison-Wesley, 1994, p. 268, Row reversed table 268. - Wolfdieter Lang, Apr 03 2017
  • Douglas C. Montgomery and Lynwood A. Johnson, Forecasting and Time Series Analysis, MaGraw-Hill, New York, 1976, page 91. - Roger L. Bagula and Gary W. Adamson, Aug 14 2008

Crossrefs

See A008292 (subtriangle for k>=1 and n>=1), which is the main entry for these numbers. Another version has the zeros at the ends of the rows, as in Concrete Mathematics: see A173018.
T(2n,n) gives A180056.

Programs

  • Haskell
    a123125 n k = a123125_tabl !! n !! k
    a123125_row n = a123125_tabl !! n
    a123125_tabl = [1] : zipWith (:) [0, 0 ..] a008292_tabl
    -- Reinhard Zumkeller, Nov 06 2013
    
  • Maple
    gf := 1/(1 - t*exp(x)): ser := series(gf, x, 12):
    cx := n -> (-1)^(n + 1)*factor(n!*coeff(ser, x, n)*(t - 1)^(n + 1)):
    seq(print(seq(coeff(cx(n), t, k), k = 0..n)), n = 0..9); # Peter Luschny, Feb 11 2021
    A123125 := proc(n, k) option remember; if k = n then 1 elif k <= 0 or k > n then 0 else k*procname(n-1, k) + (n-k+1)*procname(n-1, k-1) fi end:
    seq(print(seq(A123125(n, k), k=0..n)), n=0..10); # Peter Luschny, Mar 28 2021
    # Alternative (Patrick J. Burchell):
    t := a -> Statistics:-Difference([0, a]): Trow := k -> (t@@(k+1))([seq(n^k, n = 0..k)]):
    seq(print(Trow(n)), n = 0..6); # Peter Luschny, Apr 02 2023
  • Mathematica
    f[x_, n_] := f[x, n] = (1 - x)^(n + 1)*Sum[k^n*x^k, {k, 0, Infinity}];
    Table[CoefficientList[f[x, n], x], {n,0,9}] // Flatten (* Roger L. Bagula, Aug 14 2008 *)
    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]; T[n_, k_] := t[n, n-k];
    Table[T[n, k], {n,0,10}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 26 2019 *)
    A123125[n_, k_] := Sum[(-1)^j*(n - j - k + 1)^n * Binomial[n + 1, j], {j, 0, n - k}];
    Table[A123125[n, k], {n, 0, 9}, {k, 0, n}] // TableForm  (* Peter Luschny, Aug 12 2022 *)
  • Python
    from math import isqrt, comb
    def A123125(n):
        a = (m:=isqrt(k:=n+1<<1))+(k>m*(m+1))
        b = comb(a+1,2)-n
        return sum(-(b-j)**(a-1)*comb(a,j) if j&1 else (b-j)**(a-1)*comb(a,j) for j in range(b)) # Chai Wah Wu, Nov 13 2024
  • Sage
    def statistic_eulerian(pi):
        if not pi: return 0
        h, i, branch, next = 0, len(pi), [0], pi[0]
        while True:
            while next < branch[len(branch)-1]:
                del(branch[len(branch)-1])
            current = 0
            h += 1
            while next > current:
                i -= 1
                if i == 0: return h
                branch.append(next)
                current, next = next, pi[i]
    def A123125_row(n):
        L = [0]*(n+1)
        for p in Permutations(n):
            L[statistic_eulerian(p)] += 1
        return L
    [A123125_row(n) for n in range(7)] # Peter Luschny, Dec 09 2015
    

Formula

Sum_{k=0..n} T(n,k) = n! = A000142(n).
Sum_{k=0..n} 2^k*T(n,k) = A000629(n).
Sum_{k=0..n} 3^k*T(n,k) = abs(A009362(n+1)).
Sum_{k=0..n} 2^(n-k)*T(n,k) = A000670(n).
Sum_{k=0..n} T(n,k)*3^(n-k) = A122704(n). - Philippe Deléham, Nov 07 2007
G.f.: f(x,n) = (1 - x)^(n + 1)*Sum_{k>=0} k^n*x^k. - Roger L. Bagula and Gary W. Adamson, Aug 14 2008. f is not the g.f. of the triangle, it is the polynomial of row n. See an Apr 03 2017 comment above - Wolfdieter Lang, Apr 03 2017
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A000142(n), A000629(n), A123227(n), A201355(n), A201368(n) for x = 0, 1, 2, 3, 4, 5 respectively. - Philippe Deléham, Dec 01 2011
E.g.f. (1-t)/(1-t*exp((1-t)x)). A123125 * A007318 = A130850 = unsigned A075263, related to reversed A028246. A007318 * A123125 = A046802. Evaluating the row polynomials at -1, giving the alternating-sign row sum, generates A009006. - Tom Copeland, Oct 14 2015
From Wolfdieter Lang, Apr 03 2017: (Start)
T(n, k) = A173018(n, n-k), 0 <= k <= n. Row reversed Euler's triangle. See Graham et al., p. 268.
Recurrence (from A173018): T(n, 0) = 1 if n=0 else 0; T(n, k) = 0 if n < k and T(n, k) = (n+1-k)*T(n-1, k-1) + k*T(n-1, k) else.
T(n, k) = Sum_{j=0..k} (-1)^(k-j)*binomial(n-j, k-j)*S2(n, j)*j!, 0 <= k <= n, else 0. For S2(n, k)*k! see A131689.
The recurrence for the o.g.f. of the sequence of column k is
G(k, x) = (x/(1 - k*x))*(E_x - (k-2))*G(k-1, x), with the Euler operator E_x = x*d_x, for k >= 1, with G(0, x) = 1. (Proof from the recurrence of T(n, k)).
The e.g.f of the sequence of column k is found from E(k, x) = (1 + int(A(k, x),x)*exp(-k*x))*exp(k*x), k >= 1, with the recurrence
A(k, x) = x*A(k-1, x) +(1 + (1-k)*(1-x))*E(k-1, x) for k >= 1, with A(0,x)= 0. (Proof from the recurrence of T(n, k)). (End)
T(n, k) = Sum_{j=0..n-k} (-1)^j*(n-j-k+1)^n*binomial(n + 1, j). - Peter Luschny, Aug 12 2022
G.f.: Sum_{m >= 0} x^m/(1/(1-x)-m*t). - Mamuka Jibladze, Mar 12 2025

A177042 Eulerian version of the Catalan numbers, a(n) = A008292(2*n+1,n+1)/(n+1).

Original entry on oeis.org

1, 2, 22, 604, 31238, 2620708, 325024572, 55942352184, 12765597850950, 3730771315561300, 1359124435588313876, 603916464771468176392, 321511316149669476991132, 202039976682357297272094824, 147980747895225006590333244088, 124963193751534047864734415925360
Offset: 0

Views

Author

Roger L. Bagula, May 01 2010

Keywords

Comments

According to the Bidkhori and Sullivant reference's abstract, authors show "that the Eulerian-Catalan numbers enumerate Dyck permutations, [providing] two proofs for this fact, the first using the geometry of alcoved polytopes and the second a direct combinatorial proof via an Eulerian-Catalan analog of the Chung-Feller theorem." - Jonathan Vos Post, Jan 07 2011
Twice the number of permutations of {1,2,...,2n} with n ascents. - Peter Luschny, Jan 11 2011

Crossrefs

Bisection (odd part) of A303287.
Row sums of A316728.

Programs

  • Magma
    A177042:=func< n | n eq 0 select 1 else 2*(&+[(-1)^k*Binomial(2*n+1,k)*(n-k+1)^(2*n): k in [0..n]]) >;
    [A177042(n): n in [0..40]]; // G. C. Greubel, Jun 18 2024
    
  • Maple
    A177042 := proc(n) A008292(2*n+1,n+1)/(n+1) ; end proc:
    seq(A177042(n),n=0..10) ; # R. J. Mathar, Jan 08 2011
    A177042 := n -> A025585(n+1)/(n+1):
    A177042 := n -> `if`(n=0,1,2*A180056(n)):
    # The A173018-based recursion below needs no division!
    A := proc(n, k) option remember;
           if n = 0 and k = 0 then 1
         elif k > n  or k < 0 then 0
         else (n-k) *A(n-1, k-1) +(k+1) *A(n-1, k)
           fi
         end:
    A177042 := n-> `if`(n=0, 1, 2*A(2*n, n)):
    seq(A177042(n), n=0..30);
    # Peter Luschny, Jan 11 2011
  • Mathematica
    << DiscreteMath`Combinatorica`
    Table[(Eulerian[2*n + 1, n])/(n + 1), {n, 0, 20}]
    (* Second program: *)
    A[n_, k_] := A[n, k] = Which[n == 0 && k == 0, 1, k > n || k < 0, 0, True, (n - k)*A[n - 1, k - 1] + (k + 1)*A[n - 1, k]]; A177042[n_] := If[n == 0, 1, 2*A[2*n, n]]; Table[A177042[n], {n, 0, 30}] (* Jean-François Alcover, Jul 13 2017, after Peter Luschny *)
  • SageMath
    def A177042(n): return 2*sum((-1)^k*binomial(2*n+1,k)*(n-k+1)^(2*n) for k in range(n+1)) - int(n==0)
    [A177042(n) for n in range(41)] # G. C. Greubel, Jun 18 2024

Formula

a(n) = 2*A180056(n) for n > 0, A180056 the central Eulerian numbers in the sense of A173018.
a(n) = A025585(n+1)/(n+1), A025585 the central Eulerian numbers in the sense of A008292.
a(n) = 2 Sum_{k=0..n} (-1)^k binomial(2n+1,k) (n-k+1)^(2n).
a(n) = (n+1)^(-1) Sum_{k=0..n} (-1)^k binomial(2n+2,k)(n+1-k)^(2n+1). - Peter Luschny, Jan 11 2011
a(n) = A008518(2n,n). - Alois P. Heinz, Jun 12 2017
From Alois P. Heinz, Jul 21 2018: (Start)
a(n) = (2n)! * [x^(2n) y^n] (exp(x)-y*exp(y*x))/(exp(y*x)-y*exp(x)).
a(n) = (2n+1)!/(n+1) * [x^(2n+1) y^(n+1)] (1-y)/(1-y*exp((1-y)*x)). (End)

Extensions

Edited by Alois P. Heinz, Jan 14 2011

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

Views

Author

Alois P. Heinz, Apr 20 2018

Keywords

Comments

Here p is a permutation of 1,2,3,...,2n, and p0 refers to the string p followed by 0.
Also the number of permutations p of [2n] such that the sequence of ascents and descents of 0p forms a Dyck path. a(2) = 8: 1432, 2143, 2431, 3142, 3241, 3421, 4132, 4231.
Also the number of permutations p of [2n] that are of odd order and whose M statistic (as defined in the Spiro paper) is equal to n-1. - Sam Spiro, Nov 01 2018

Examples

			a(0) = 1: the empty permutation.
a(1) = 1: 12.
a(2) = 8: 1243, 1324, 1342, 1423, 2314, 2341, 2413, 3412.
		

Crossrefs

Bisection (even part) of A303284.
Bisection (even part) of A303287.
Column k=0 of A316728.

Programs

  • Maple
    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);
  • Mathematica
    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 *)
  • PARI
    \\ 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

Formula

a(n) ~ c * 2^(2*n) * n^(2*n - 1) / exp(2*n), where c = 8.838022110416151362523442920999767406145711133564692... - Vaclav Kotesovec, May 22 2018
a(n) = (1/2)*Sum_{k odd} binomial(2*n,k)*A177042((k-1)/2)*A177042((2n-k-1)/2) for n>0. - Sam Spiro, Nov 01 2018
a(n) = A321280(2n,n-1) for n >= 1. - Alois P. Heinz, Nov 02 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

Views

Author

Alois P. Heinz, Apr 20 2018

Keywords

Examples

			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.
		

Crossrefs

Bisections give: A303285 (even part), A177042 (odd part).

Programs

  • Maple
    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);
  • Mathematica
    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 *)

Formula

a(2n) = A303284(2n).

A006551 Maximal Eulerian numbers.

Original entry on oeis.org

1, 1, 4, 11, 66, 302, 2416, 15619, 156190, 1310354, 15724248, 162512286, 2275172004, 27971176092, 447538817472, 6382798925475, 114890380658550, 1865385657780650, 37307713155613000, 679562217794156938, 14950368791471452636
Offset: 1

Views

Author

Keywords

Comments

From Peter Luschny, Aug 08 2010: (Start)
Define A(n,k) as the number of permutations of {1,2,..,n} with k ascents.
A(n,k) = sum_{j=0}^k (-1)^j binomial(n+1,j)(k-j+1)^n.
Then a(n) = A(n, floor(n/2)). The Digital Library of Mathematical Functions calls the A(n,k) Eulerian numbers. With this terminology a(n) are the middle Eulerian numbers and A180056 the central Eulerian numbers. (End)
Number of permutations of {1,2,..,n} with floor(n/2) descents. - Joerg Arndt, Aug 15 2014

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 243.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A008292. Bisections are A025585 and A180056.

Programs

  • Maple
    a := proc(n) local j,k; k := iquo(n,2);
    add((-1)^j*binomial(n+1,j)*(k-j+1)^n,j=0..k) end:
    #  Peter Luschny, Aug 08 2010
    # Computation by recursion:
    A006551 := proc(r) local W; W := proc(m) local A,n,k;
    A:=[seq(1, n=1..m)]; if m < 2 then RETURN(1) fi;
    for n from 2 to m-1 do for k from 2 to m do
    A[k] := n*A[k-1]+k*A[k] od od; [A[m-1],A[m]] end:
    W((r+2+irem(r,2))/2)[2-irem(r,2)] end:
    # Peter Luschny, Jan 12 2011
  • Mathematica
    a[n_] := With[{k = Quotient[n, 2]}, Sum[(-1)^j*Binomial[n+1, j]*(k-j+1)^n, {j, 0, k}]]; Array[a, 25] (* Jean-François Alcover, Feb 19 2017, after Peter Luschny *)

Formula

a(n) = sum_{0<=j<=floor(n/2)} (-1)^j binomial(n+1,j) (floor(n/2)-j+1)^n. [Peter Luschny, Aug 08 2010]
a(n+1)/a(n) ~ n. - Ran Pan, Oct 26 2015
a(n) ~ 2 * sqrt(3) * n^n / exp(n). - Vaclav Kotesovec, Oct 28 2021

A025585 Central Eulerian numbers A(2n-1,n).

Original entry on oeis.org

1, 4, 66, 2416, 156190, 15724248, 2275172004, 447538817472, 114890380658550, 37307713155613000, 14950368791471452636, 7246997577257618116704, 4179647109945703200884716, 2828559673553002161809327536, 2219711218428375098854998661320
Offset: 1

Views

Author

Keywords

Comments

It appears to be equal to the sum over all NE lattice walks from (1,1) to (n,n) of the product over all N steps of the current x coordinate (the number of E steps which came before it plus one) times the product over all E steps of the current y coordinate. - Jonathan Noel, Oct 10 2018

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 254.
  • B. Sturmfels, Solving Systems of Polynomial Equations, Amer. Math. Soc., 2002, see p. 27 (is that the same sequence?)

Crossrefs

Programs

  • Maple
    # First program
    A025585 := n-> add((-1)^j *(n-j)^(2*n-1) *binomial (2*n, j), j=0..n-1):
    seq(A025585(n), n=1..30);
    # This second program computes the list of
    # the first m Central Eulerian numbers very efficiently
    A025585_list :=
       proc(m) local A, R, n, k;
          R := 1;
          if m > 1 then
             A := array([seq(1,n=1..m)]);
             for n from 2 to m do
                for k from 2 to m do
                   A[k] := n*A[k-1] + k*A[k];
                   if n = k then R:= R, A[k] fi
                od
             od
          fi;
          R
       end:
    A025585_list(30); # Peter Luschny, Jan 11 2011
  • Mathematica
    f[n_] := Sum[(-1)^j*(n - j)^(2 n - 1)*Binomial[2 n, j], {j, 0, n}]; Array[f, 14] (* Robert G. Wilson v, Jan 10 2011 *)

Formula

a(n) = sum((-1)^j*(n-j)^(2n-1)*binomial(2n, j), j=0..n). This is T(2n-1, n), where T(n, k) = sum((-1)^j*(k-j+1)^n*binomial(n+1, j), j=0..k) (Cf. A008292 and DMLF link).
a(n) = 2*n* A180056(n-1). - Gary Detlefs, Nov 11 2011
a(n+1)/a(n) ~ 4*n^2. - Ran Pan, Oct 26 2015
a(n) ~ sqrt(3) * 2^(2*n) * n^(2*n-1) / exp(2*n). - Vaclav Kotesovec, Oct 16 2016
From Alois P. Heinz, Jul 21 2018: (Start)
a(n) = n * (2n-2)! * [x^(2n-2) y^(n-1)] (exp(x)-y*exp(y*x))/(exp(y*x)-y*exp(x)).
a(n) = (2n)!/n [x^(2n) y^n] (1-y*x)/(1-y*exp((1-y)*x)). (End)

A303284 Number of permutations p of [n] such that the sequence of ascents and descents of 0p or of 0p0 (if n is odd) forms a Dyck path.

Original entry on oeis.org

1, 1, 1, 4, 8, 60, 172, 1974, 7296, 114972, 518324, 10490392, 55717312, 1384890104, 8460090160, 250150900354, 1726791794432, 59317740001132, 456440969661508, 17886770092245360, 151770739970889792, 6687689652133397064, 62022635037246022000, 3037468107154650475868
Offset: 0

Views

Author

Alois P. Heinz, Apr 20 2018

Keywords

Examples

			a(0) = 1: the empty permutation.
a(1) = 1: 1.
a(2) = 1: 21.
a(3) = 4: 132, 213, 231, 312.
a(4) = 8: 1432, 2143, 2431, 3142, 3241, 3421, 4132, 4231.
		

Crossrefs

Bisections give: A303285 (even part), A303286 (odd part).

Programs

  • Maple
    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, n, 0):
    seq(a(n), n=0..25);
  • Mathematica
    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, n, 0];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 25 2018, translated from Maple *)
  • PARI
    b(u, o, t) = if(u+o==0, 1, if(t > 0, sum(j=1, u, b(u-j, o+j-1, t-1)), 0) + if(o+u > t, sum(j=1, o, b(u+j-1, o-j, t+1)), 0))
    a(n) = b(0, n, 0) \\ Felix Fröhlich, May 25 2018, adapted from Mathematica

Formula

a(2n) = A303287(2n).

A320337 a(n) = A271697(2*n, n).

Original entry on oeis.org

1, 1, 7, 161, 7631, 607009, 72605303, 12172272321, 2722634203807, 783282749905601, 281751782666559239, 123890976070562785633, 65380371270827869603439, 40779819387085820255904481, 29677003954344675666092048791, 24921035407468294238607282809729
Offset: 0

Views

Author

Maxwell Jiang, Dec 18 2018 (added without permission by editors)

Keywords

Comments

Central coefficients of the triangles A046739 and A271697.

Crossrefs

Programs

  • Maple
    a := n -> add((-1)^(n-k)*combinat:-eulerian1(n+k,n)*binomial(2*n,n-k), k=0..n): seq(a(n), n=0..15); # Peter Luschny, Dec 19 2018
  • Mathematica
    E1[n_ /; n >= 0, 0] = 1; E1[n_, k_] /; k < 0 || k > n = 0; E1[n_, k_] := E1[n, k] = (n - k) E1[n - 1, k - 1] + (k + 1) E1[n - 1, k];
    a[n_] := Sum[(-1)^(n - k) E1[n + k, n] Binomial[2 n, n - k], {k, 0, n}];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Dec 30 2018, after Peter Luschny *)

Formula

a(n) = Sum_{k=0..n} (-1)^(n-k)*E(n+k, n)*binomial(2*n,n-k) where E are the Eulerian numbers A173018. - Peter Luschny, Dec 19 2018
a(n) ~ sqrt(3) * 2^(2*n + 1) * n^(2*n) / exp(2*n + 1). - Vaclav Kotesovec, Dec 19 2018

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

Views

Author

Alois P. Heinz, Apr 20 2018

Keywords

Examples

			a(1) = 4: 132, 213, 231, 312.
		

Crossrefs

Bisection (odd part) of A303284.
Cf. A180056.

Programs

  • Maple
    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);
  • Mathematica
    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 *)

Formula

a(n) ~ c * 2^(2*n) * n^(2*n) / exp(2*n), where c = 45.0971960423271758887353825240016439879529954831112316... - Vaclav Kotesovec, May 22 2018

A382309 Number of permutations of [2n] with exactly n ascents and an even number of inversions.

Original entry on oeis.org

1, 1, 5, 147, 7819, 655315, 81255642, 13985577438, 3191399514435, 932692830330915, 339781108888268398, 150979116192562395562, 80377829037419610855326, 50509994170589416909171726, 36995186973806250851237265812, 31240798437883511927927569474140
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2025

Keywords

Crossrefs

Formula

a(n) = A128612(2n,n).
a(n) ~ sqrt(3) * 2^(2*n) * n^(2*n) / exp(2*n). - Vaclav Kotesovec, Apr 02 2025
Showing 1-10 of 11 results. Next