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-5 of 5 results.

A154413 a(n) = A006551(n) - A018224(n).

Original entry on oeis.org

0, 0, 0, 2, 30, 202, 2016, 14394, 151290, 1294478, 15660744, 162298842, 2274318228, 27968231436, 447527038848, 6382757516250, 114890215021650, 1865385066804550, 37307710791708600, 679562209260462054
Offset: 0

Views

Author

Roger L. Bagula, Jan 09 2009

Keywords

Crossrefs

Programs

  • Mathematica
    t[n_, k_] = Sum[(-1)^j Binomial[n + 1, j](k + 1 - j)^n, {j, 0, k + 1}];
    a0 = Table[t[n, Floor[n/2]], {n, 1, 30}];
    b0 = Table[Binomial[n, Floor[(n)/2]]^2, {n, 0, 29}];
    a=a0-b0

Formula

a(n) = Eulerian[n,Floor[n/2]] - Binomial[n,Floor[n/2]]^2.

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

Views

Author

Peter Luschny, Aug 08 2010

Keywords

Comments

Define the Eulerian numbers A(n,k) (see A008292) to be 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(2*n,n) are the central Eulerian numbers. (Analogous to what are called the central binomial coefficients).

Crossrefs

A bisection of A006551.
A diagonal of A321967.

Programs

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

Formula

a(n-1) = A025585(n)/(2*n). - 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+1) * n^(2*n) / exp(2*n). - Vaclav Kotesovec, Oct 16 2016
From Alois P. Heinz, Jul 21 2018: (Start)
a(n) = ceiling(1/2 * (2n)! * [x^(2n) y^n] (exp(x)-y*exp(y*x))/(exp(y*x)-y*exp(x))).
a(n) = (2n)! * [x^(2n) y^n] (1-y)/(1-y*exp((1-y)*x)). (End)
a(n) = A123125(2n,n). - Alois P. Heinz, Nov 13 2024

Extensions

Partially edited by N. J. A. Sloane, Aug 08 2010

A154420 Maximal coefficient of MacMahon polynomial (cf. A060187) p(x,n)=2^n*(1 - x)^(n + 1)* LerchPhi[x, -n, 1/2]; that is, a(n) = Max(coefficients(p(x,n))).

Original entry on oeis.org

1, 1, 6, 23, 230, 1682, 23548, 259723, 4675014, 69413294, 1527092468, 28588019814, 743288515164, 16818059163492, 504541774904760, 13397724585164019, 455522635895576646, 13892023109165902550, 527896878148304296900
Offset: 0

Views

Author

Roger L. Bagula, Jan 09 2009

Keywords

Comments

Since the center is the maximum in the Pascal, Eulerian and MacMahon triangles, a(n)=MacMahon[n,Floor[n/2]]

Crossrefs

Programs

  • Maple
    gf := proc(n, k) local f; f := (x,t) -> x*exp(t*x/k)/(1-x*exp(t*x));
    series(f(x,t), t, n+2); ((1-x)/x)^(n+1)*k^n*n!*coeff(%, t, n):
    collect(simplify(%), x) end:
    seq(coeff(gf(n,1),x,iquo(n,2)),n=0..18); # Middle Eulerian numbers, A006551.
    seq(coeff(gf(n,2),x,iquo(n,2)),n=0..18); # Middle midpoint Eulerian numbers.
    # Peter Luschny, May 02 2013
  • Mathematica
    p[x_, n_] = 2^n*(1 - x)^(n + 1)* LerchPhi[x, -n, 1/2];
    Table[Max[CoefficientList[FullSimplify[ExpandAll[p[x, n]]], x]], {n, 0, 30}]

Formula

a(n) ~ sqrt(3) * 2^(n+1) * n^n / exp(n). - Vaclav Kotesovec, Oct 28 2021

Extensions

Edited by N. J. A. Sloane, Jan 15 2009

A304001 Number of permutations of [n] whose up-down signature has a nonnegative total sum.

Original entry on oeis.org

1, 1, 1, 5, 12, 93, 360, 3728, 20160, 259535, 1814400, 27820524, 239500800, 4251096402, 43589145600, 877606592736, 10461394944000, 235288904377275, 3201186852864000, 79476406782222500, 1216451004088320000, 33020655481590446318, 562000363888803840000
Offset: 0

Views

Author

Alois P. Heinz, May 04 2018

Keywords

Comments

The up-down signature has (+1) for each ascent and (-1) for each descent.

Crossrefs

Bisections give: A002674 (even part), A179457(2n+1,n+1) (odd part).
Cf. A000246 (for nonnegative partial sums), A006551 (total sums are 0 or 1), A008292, A303287.

Programs

  • Maple
    b:= proc(u, o, t) option remember; (n->
         `if`(t>=n, n!, `if`(t<-n, 0,
          add(b(u-j, o+j-1, t-1), j=1..u)+
          add(b(u+j-1, o-j, t+1), j=1..o))))(u+o)
        end:
    a:= n-> `if`(n=0, 1, add(b(j-1, n-j, 0), j=1..n)):
    seq(a(n), n=0..25);
    # second Maple program:
    a:= n-> `if`(irem(n, 2, 'r')=0, ceil(n!/2),
             add(combinat[eulerian1](n, j), j=0..r)):
    seq(a(n), n=0..25);
  • Mathematica
    Eulerian1[n_, k_] := If[k == 0, 1, If[n == 0, 0, Sum[(-1)^j (k - j + 1)^n Binomial[n + 1, j], {j, 0, k + 1}]]];
    a[n_] := Module[{r, m}, {r, m} = QuotientRemainder[n, 2]; If[m == 0, Ceiling[n!/2], Sum[Eulerian1[n, j], {j, 0, r}]]];
    a /@ Range[0, 25] (* Jean-François Alcover, Mar 26 2021, after 2nd Maple program *)

A154416 Maximal Stirling numbers of the first kind.

Original entry on oeis.org

1, 1, 1, 2, 11, 35, 274, 1624, 13068, 118124, 1026576, 12753576, 120543840, 1931559552, 20313753096, 392156797824, 5056995703824, 102992244837120, 1583313975727488, 34012249593822720, 610116075740491776, 13803759753640704000, 284093315901811468800
Offset: 0

Views

Author

Roger L. Bagula, Jan 09 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[Table[StirlingS1[n, m], {m, 0, n}]], {n, 0, 30}]
  • PARI
    a(n) = vecmax(vector(n+1, m, stirling(n, m-1, 1))); \\ Michel Marcus, Sep 16 2016

Formula

a(n) = max_{m=0..n} StirlingS1(n,m).
Showing 1-5 of 5 results.