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

A046739 Triangle read by rows, related to number of permutations of [n] with 0 successions and k rises.

Original entry on oeis.org

0, 1, 1, 1, 1, 7, 1, 1, 21, 21, 1, 1, 51, 161, 51, 1, 1, 113, 813, 813, 113, 1, 1, 239, 3361, 7631, 3361, 239, 1, 1, 493, 12421, 53833, 53833, 12421, 493, 1, 1, 1003, 42865, 320107, 607009, 320107, 42865, 1003, 1, 1, 2025, 141549, 1704693, 5494017
Offset: 1

Views

Author

Keywords

Comments

From Emeric Deutsch, May 25 2009: (Start)
T(n,k) is the number of derangements of [n] having k excedances. Example: T(4,2)=7 because we have 3*14*2, 3*4*12, 4*3*12, 2*14*3, 2*4*13, 3*4*21, 4*3*21, each with two excedances (marked). An excedance of a permutation p is a position i such that p(i) > i.
Sum_{k>=1} k*T(n,k) = A000274(n+1). (End)
The triangle 1;1,1;1,7,1;... has general term T(n,k) = Sum_{j=0..n+2} (-1)^(n-j)*C(n+2,j)*A123125(j,k+2) and bivariate g.f. ((1-y)*(y*exp(2*x*y) + exp(x*(y+1))(y^2 - 4*y + 1) + y*exp(2*x)))/(exp(x*y) - y*exp(x))^3. - Paul Barry, May 10 2011
The n-th row is the local h-vector of the barycentric subdivision of a simplex, i.e., the Coxeter complex of type A. See Proposition 2.4 of Stanley's paper below. - Kyle Petersen, Aug 20 2012
T(n,k) is the k-th coefficient of the local h^*-polynomial, or box polynomial, of the s-lecture hall n-simplex with s=(2,3,...,n+1). See Theorem 4.1 of the paper by N. Gustafsson and L. Solus below. - Liam Solus, Aug 23 2018

Examples

			Triangle starts:
  0;
  1;
  1,   1;
  1,   7,   1;
  1,  21,  21,   1;
  1,  51, 161,  51,   1;
  1, 113, 813, 813, 113, 1;
  ...
From _Peter Luschny_, Sep 17 2021: (Start)
The triangle shows the coefficients of the following bivariate polynomials:
  [1] 0;
  [2] x*y;
  [3] x^2*y +     x*y^2;
  [4] x^3*y +   7*x^2*y^2 +     x*y^3;
  [5] x^4*y +  21*x^3*y^2 +  21*x^2*y^3 +     x*y^4;
  [6] x^5*y +  51*x^4*y^2 + 161*x^3*y^3 +  51*x^2*y^4 +     x*y^5;
  [7] x^6*y + 113*x^5*y^2 + 813*x^4*y^3 + 813*x^3*y^4 + 113*x^2*y^5 + x*y^6;
  ...
These polynomials are the permanents of the n X n matrices with all entries above the main antidiagonal set to 'x' and all entries below the main antidiagonal set to 'y'. The main antidiagonals consist only of zeros. Substituting x <- 1 and y <- -1 generates the Euler secant numbers A122045. (Compare with A081658.)
(End)
		

Crossrefs

Cf. A046740.
Row sums give A000166.
Diagonals give A070313, A070315.
T(2n,n) gives A320337.

Programs

  • Maple
    G := (1-t)*exp(-t*z)/(1-t*exp((1-t)*z)): Gser := simplify(series(G, z = 0, 15)): for n to 13 do P[n] := sort(expand(factorial(n)*coeff(Gser, z, n))) end do: 0; for n to 11 do seq(coeff(P[n], t, j), j = 1 .. n-1) end do; # yields sequence in triangular form # Emeric Deutsch, May 25 2009
  • Mathematica
    max = 12; f[t_, z_] := (1-t)*(Exp[-t*z]/(1 - t*Exp[(1-t)*z])); se = Series[f[t, z], {t, 0, max}, {z, 0, max}];
    coes = Transpose[ #*Range[0, max]! & /@ CoefficientList[se, {t, z}]]; Join[{0}, Flatten[ Table[ coes[[n, k]], {n, 2, max}, {k, 2, n-1}]]] (* Jean-François Alcover, Oct 24 2011, after g.f. *)
    E1[n_ /; n >= 0, 0] = 1; (* E1(n,k) are the Eulerian numbers *)
    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];
    T[n_, k_] := Sum[Binomial[-j-1, -n-1] E1[j, k], {j, 0, n}];
    Table[T[n, k], {n, 1, 100}, {k, 1, n-1}] /. {} -> {0} // Flatten (* Jean-François Alcover, Oct 31 2020, after Peter Luschny in A271697 *)
    Table[Expand[n!Factor[SeriesCoefficient[(x-y)/(x Exp[y t]-y Exp[x t]),{t,0,n}]]],{n,0,12}]//TableForm (* Mamuka Jibladze, Nov 26 2024 *)
  • PARI
    T(n)={my(x='x+O('x^(n+1))); concat([[0]], [Vecrev(p/y) | p<-Vec(-1+serlaplace((y-1)/(y*exp(x)-exp(x*y))))])}
    { my(A=T(10));for(i=1,#A,print(A[i])) } \\ Andrew Howroyd, Nov 13 2024

Formula

a(n+1, r) = r*a(n, r) + (n+1-r)*a(n, r-1) + n*a(n-1, r-1).
exp(-t)/(1 - exp((x-1)t)/(x-1)) = 1 + x*t^2/2! + (x+x^2)*t^3/3! + (x+7x^2+x^3)*t^4/4! + (x+21x^2+21x^3+x^4)*t^5/5! + ... - Philippe Deléham, Jun 11 2004
E.g.f.: (y-1)/(y*exp(x) - exp(x*y)). - Mamuka Jibladze, Nov 08 2024

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 07 2000

A062868 Number of permutations of degree n with barycenter 0.

Original entry on oeis.org

1, 1, 2, 4, 14, 46, 282, 1394, 12658, 83122, 985730, 8012962, 116597538, 1127575970, 19410377378, 217492266658, 4320408974978, 55023200887938, 1238467679662722, 17665859065690754, 444247724347355554, 7015393325151055906, 194912434760367113570, 3375509056735963889634
Offset: 0

Views

Author

Olivier Gérard, Jun 26 2001

Keywords

Comments

The barycenter or signcenter of a permutation is the sum of the signs of the difference between initial and final positions of the objects.

Examples

			(4,1,3,5,2) has difference (3,-1,0,1,-3) and signs (1,-1,0,1,-1) with total 0.
		

Crossrefs

Column k=0 of A062866 or of A062867.

Programs

  • Maple
    b:= proc(s, t) option remember; (n-> `if`(abs(t)>n, 0, `if`(n=0, 1,
          add(b(s minus {j}, t+signum(n-j)), j=s))))(nops(s))
        end:
    a:= n-> b({$1..n}, 0):
    seq(a(n), n=0..14);  # Alois P. Heinz, Jul 31 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];
    b[n_] := Sum[(-1)^(n-k) E1[n+k, n] Binomial[2n, n-k], {k, 0, n}];
    a[n_] := Sum[Binomial[n, n-2k] b[k], {k, 0, n/2}];
    a /@ Range[0, 150] (* Jean-François Alcover, Oct 29 2020, after Peter Luschny in A320337 *)

Formula

a(n) = Sum_{k=0..floor(n/2)} binomial(n, n-2*k)*A320337(k). - Maxwell Jiang, Dec 19 2018 (added by editors)
a(n) ~ sqrt(3) * (1 + exp(-2)*(-1)^n) * n^n / exp(n). - Vaclav Kotesovec, Oct 29 2020

Extensions

One more term from Vladeta Jovovic, Jun 28 2001
a(11)-a(14) from Hugo Pfoertner, Sep 23 2004
a(15)-a(18) from R. H. Hardin, Jul 18 2010
a(19)-a(22) from Kyle G Hess, Jul 30 2018
a(0)=1 prepended by Alois P. Heinz, Jul 30 2018
Terms a(23) and beyond from Maxwell Jiang, Dec 19 2018

A271697 Triangle read by rows, T(n,k) = Sum_{j=0..n} C(-j-1,-n-1)*E1(j,k), E1 the Eulerian numbers A173018, for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 7, 1, 0, 0, 1, 21, 21, 1, 0, 0, 1, 51, 161, 51, 1, 0, 0, 1, 113, 813, 813, 113, 1, 0, 0, 1, 239, 3361, 7631, 3361, 239, 1, 0, 0, 1, 493, 12421, 53833, 53833, 12421, 493, 1, 0, 0, 1, 1003, 42865, 320107, 607009, 320107, 42865, 1003, 1, 0
Offset: 0

Views

Author

Peter Luschny, Apr 12 2016

Keywords

Examples

			Triangle starts:
  1;
  0, 0;
  0, 1,   0;
  0, 1,   1,   0;
  0, 1,   7,   1,   0;
  0, 1,  21,  21,   1,   0;
  0, 1,  51, 161,  51,   1, 0;
  0, 1, 113, 813, 813, 113, 1, 0;
  ...
		

Crossrefs

Variant: A046739 (main entry for this triangle).
Cf. A000166 (row sums), A122045 (Euler numbers are the alternating row sums), A070313 (col. 2) and (diag. n,n-2).
Cf. A173018.
T(2n,n) gives A320337.

Programs

  • Maple
    A271697 := (n,k) -> add(binomial(-j-1,-n-1)*combinat:-eulerian1(j,k), j=0..n):
    seq(seq(A271697(n, k), k=0..n), n=0..11);
  • Mathematica
    <= 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];
    T[n_, k_] := Sum[Binomial[-j-1, -n-1] E1[j, k], {j, 0, n}];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 29 2020 *)
  • PARI
    T(n)={my(x='x+O('x^(n+1)), v=Vec(serlaplace((y-1)/(y*exp(x)-exp(x*y))))); vector(#v,n,Vecrev(v[n],n))}
    { my(A=T(10)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Nov 13 2024

Formula

T(n,k) = T(n,n-k). - Alois P. Heinz, Oct 29 2020

A321967 Triangle read by rows, T(n,k) = binomial(-k-n-1, -2*n-1)*E1(k+n, n), E1 the Eulerian numbers A173018, for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, -4, 11, 0, 15, -156, 302, 0, -56, 1596, -9528, 15619, 0, 210, -14400, 193185, -882340, 1310354, 0, -792, 122265, -3213760, 30042672, -116857368, 162512286, 0, 3003, -1005004, 47887840, -802069632, 6034981134, -21078701112, 27971176092
Offset: 0

Views

Author

Peter Luschny, Dec 18 2018

Keywords

Examples

			Triangle starts:
                       1;
                  0,        1;
              0,      -4,       11;
          0,     15,      -156,      302;
       0,   -56,     1596,    -9528,     15619;
    0,   210,  -14400,   193185,   -882340,   1310354;
  0, -792, 122265, -3213760, 30042672, -116857368, 162512286;
		

Crossrefs

Row sums give A320337.
Cf. A046739, A180056 (main diagonal), A271697, A001791.

Programs

  • Maple
    T := (n, k) -> binomial(-k-n-1, -2*n-1)*combinat:-eulerian1(k+n, n):
    for n from 0 to 7 do seq(T(n,k), k=0..n) od;
  • 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];
    T[n_, k_] := Binomial[-k - n - 1, -2 n - 1] E1[n + k, n];
    Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten
    (* Jean-François Alcover, Dec 30 2018 *)
Showing 1-4 of 4 results.