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

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

A163626 Triangle read by rows: The n-th derivative of the logistic function written in terms of y, where y = 1/(1 + exp(-x)).

Original entry on oeis.org

1, 1, -1, 1, -3, 2, 1, -7, 12, -6, 1, -15, 50, -60, 24, 1, -31, 180, -390, 360, -120, 1, -63, 602, -2100, 3360, -2520, 720, 1, -127, 1932, -10206, 25200, -31920, 20160, -5040, 1, -255, 6050, -46620, 166824, -317520, 332640, -181440, 40320, 1, -511, 18660
Offset: 0

Views

Author

Keywords

Comments

Apart from signs and offset, same as A028246. - Joerg Arndt, Nov 06 2016
Triangle T(n,k), read by rows, given by (1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,...) DELTA (-1,-1,-2,-2,-3,-3,-4,-4,-5,-5,-6,-6,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 05 2011
The "Stirling-Bernoulli transform" maps a sequence b_0, b_1, b_2, ... to a sequence c_0, c_1, c_2, ..., where if B has o.g.f. B(x), c has e.g.f. exp(x)*B(1 - exp(x)). More explicity, c_n = Sum_{k = 0..n} A163626(n,k)*b_k. - Philippe Deléham, May 26 2015
Row sums of absolute values of terms give A000629. - Yahia DJEMMADA, Aug 16 2016
This is the triangle of connection constants for expressing the monomial polynomials (-x)^n as a linear combination of the basis polynomials {binomial(x+n,n)}n>=0, that is, (-x)^n = Sum_{k = 0..n} T(n,k)*binomial(x+k,k). Cf. A145901. - Peter Bala, Jun 06 2019
Row sums for n > 0 are zero. - Shel Kaphan, May 14 2024
The Akiyama-Tanigawa algorithm applied to a sequence yields the same result as the Stirling-Bernoulli Transform applied to the same sequence. See Philippe Deléham's comment of May 26 2015. - Shel Kaphan, May 16 2024

Examples

			y = 1/(1+exp(-x))
y^(0) = y
y^(1) = y-y^2
y^(2) = y-3*y^2+2*y^3
y^(3) = y-7*y^2+12*y^3-6*y^4
Triangle begins :
n\k 0     1     2     3     4     5    6
----------------------------------------
0:  1
1:  1    -1
2:  1    -3     2
3:  1    -7    12    -6
4:  1   -15    50   -60    24
5:  1   -31   180  -390   360  -120
6:  1   -63   602 -2100  3360 -2520  720
7:  1  -127 ... - Reformatted by _Philippe Deléham_, May 26 2015
Change of basis constants: x^4 = 1 - 15*binomial(x+1,1) + 50*binomial(x+2,2) - 60*binomial(x+3,3) + 24*binomial(x+4,4). - _Peter Bala_, Jun 06 2019
		

Crossrefs

Programs

  • Maple
    A163626 := (n, k) -> add((-1)^j*binomial(k, j)*(j+1)^n, j = 0..k):
    for n from 0 to 6 do seq(A163626(n, k), k = 0..n) od; # Peter Luschny, Sep 21 2017
  • Mathematica
    Derivative[0][y][x] = y[x]; Derivative[1][y][x] = y[x]*(1-y[x]);
    Derivative[n_][y][x] := Derivative[n][y][x] = D[Derivative[n-1][y][x], x];
    row[n_] := CoefficientList[Derivative[n][y][x], y[x]] // Rest;
    Table[row[n], {n, 0, 9}] // Flatten
    (* or *) Table[(-1)^k*k!*StirlingS2[n+1, k+1], {n, 0, 9}, {k, 0, n}] // Flatten
    (* Jean-François Alcover, Dec 16 2014 *)
  • Python
    from sympy.core.cache import cacheit
    @cacheit
    def T(n, k):return 1 if n==0 and k==0 else 0 if k>n or k<0 else (k + 1)*T(n - 1, k) - k*T(n - 1, k - 1)
    for n in range(51): print([T(n, k) for k in range(n + 1)]) # Indranil Ghosh, Sep 11 2017

Formula

T(n, k) = (-1)^k*k!*Stirling2(n+1, k+1). - Jean-François Alcover, Dec 16 2014
T(n, k) = (k+1)*T(n-1,k) - k*T(n-1,k-1), T(0,0) = 1, T(n,k) = 0 if k>n or if k<0. - Philippe Deléham, May 29 2015
Worpitzky's representation of the Bernoulli numbers B(n, 1) = Sum_{k = 0..n} T(n,k)/(k+1) = A164555(n)/A027642(n) (Bernoulli numbers). - Philippe Deléham, May 29 2015
T(n, k) = Sum_{j=0..k} (-1)^j*binomial(k, j)*(j+1)^n. - Peter Luschny, Sep 21 2017
Let W_n(x) be the row polynomials of this sequence and F_n(x) the row polynomials of A278075. Then W_n(1 - x) = F_n(x). Also Integral_{x=0..1} U_n(x) = Bernoulli(n, 1) for U in {W, F}. - Peter Luschny, Aug 10 2021

A340556 E2(n, k), the second-order Eulerian numbers with E2(0, k) = δ_{0, k}. Triangle read by rows, E2(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 8, 6, 0, 1, 22, 58, 24, 0, 1, 52, 328, 444, 120, 0, 1, 114, 1452, 4400, 3708, 720, 0, 1, 240, 5610, 32120, 58140, 33984, 5040, 0, 1, 494, 19950, 195800, 644020, 785304, 341136, 40320, 0, 1, 1004, 67260, 1062500, 5765500, 12440064, 11026296, 3733920, 362880
Offset: 0

Views

Author

Peter Luschny, Feb 05 2021

Keywords

Comments

The second-order Eulerian number E2(n, k) is the number of Stirling permutations of order n with exactly k descents; here the last index is defined to be a descent. More formally, let Q_n denote the set of permutations of the multiset {1,1,2,2, ..., n,n} in which, for all j, all entries between two occurrences of j are larger than j, then E2(n, k) = card({s in Q_n with des(s) = k}), where des(s) = card({j: s(j) > s(j+1)}) is the number of descents of s.
Also the number of Riordan trapezoidal words of length n with k distinct letters (see Riordan 1976, p. 9).
Also the number of rooted plane trees on n + 1 vertices with k leaves (see Janson 2008, p. 543).
Let b(n) = (1/2)*Sum_{k=0..n-1} (-1)^k*E2(n-1, k+1) / C(2*n-1, k+1). Apparently 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 Rzadkowski and Urlinska, example 4.)

Examples

			Triangle starts:
  [0] 1;
  [1] 0, 1;
  [2] 0, 1, 2;
  [3] 0, 1, 8,    6;
  [4] 0, 1, 22,   58,    24;
  [5] 0, 1, 52,   328,   444,     120;
  [6] 0, 1, 114,  1452,  4400,    3708,    720;
  [7] 0, 1, 240,  5610,  32120,   58140,   33984,    5040;
  [8] 0, 1, 494,  19950, 195800,  644020,  785304,   341136,   40320;
  [9] 0, 1, 1004, 67260, 1062500, 5765500, 12440064, 11026296, 3733920, 362880.
To illustrate the generating function for row 3: The expansion of (1 - x)^7*(x*exp(-x) + 16*x^2*exp(-x)^2 + (243*x^3*exp(-x)^3)/2) gives the polynomial x + 8*x^2 + 6*x^3. The coefficients of this polynomial give row 3.
.
Stirling permutations of order 3 with exactly k descents: (When counting the descents one may assume an invisible '0' appended to the permutations.)
  T[3, k=0]:
  T[3, k=1]: 112233;
  T[3, k=2]: 331122; 223311; 221133; 133122; 122331; 122133; 113322; 112332;
  T[3, k=3]: 332211; 331221; 233211; 221331; 133221; 123321.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed. Addison-Wesley, Reading, MA, 1994, p. 270.

Crossrefs

Indexing the second-order Eulerian numbers comes in three flavors: A008517 (following Riordan and Comtet), A201637 (following Graham, Knuth, and Patashnik) and this indexing, extending the definition of Gessel and Stanley. (A008517 is the main entry of the numbers.) The corresponding triangles of the first-order Eulerian numbers are A008292, A173018, and A123125.
Row reversed: A163936 (with offset = 0).
Values: E2poly(n, 1) = A001147(n), E2poly(n, -1) ~ -A001662(n+1), E2poly(n, 2) = A112487(n), 2^n*E2poly(n, 1/2) = A000311(n+1), 2^n*E2poly(n, -1/2) = A341106(n).

Programs

  • Maple
    # Using the recurrence:
    E2 := proc(n, k) option remember;
    if k = 0 and n = 0 then return 1 fi; if n < 0 then return 0 fi;
    E2(n-1, k)*k + E2(n-1, k-1)*(2*n - k) end: seq(seq(E2(n, k), k = 0..n), n = 0..9);
    # Using the row generating function:
    E2egf := n -> (1-x)^(2*n+1)*add(k^(n+k)/k!*(x*exp(-x))^k, k=0..n);
    T := (n, k) -> coeftayl(E2egf(n), x=0, k): seq(print(seq(T(n, j),j=0..n)), n=0..7);
    # Using the built-in function:
    E2 := (n, k) -> `if`(k=0, k^n, combinat:-eulerian2(n, k-1)):
    # Using the compositional inverse (series reversion):
    E2triangle := proc(N) local r, s, C; Order := N + 2;
    s := solve(y = series(x - t*(exp(x) - 1), x), x):
    r := n -> -n!*(t - 1)^(2*n - 1)*coeff(s, y, n); C := [seq(expand(r(n)), n = 1..N)];
    seq(print(seq(coeff(C[n+1], t, k), k = 0..n)), n = 0..N-1) end: E2triangle(10);
  • Mathematica
    T[n_, k_] := T[n, k] = If[k == 0, Boole[n == 0], If[n < 0, 0, k T[n - 1, k] + (2 n - k) T[n - 1, k - 1]]]; Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten
    (* Via row polynomials: *)
    E2poly[n_] := If[n == 0, 1,
      Expand[Simplify[x (x - 1)^(2 n) D[((1 - x)^(1 - 2 n) E2poly[n - 1]), x]]]];
    Table[CoefficientList[E2poly[n], x], {n, 0, 9}] // Flatten
    (* Series reversion *)
    Revert[gf_, len_] := Module[{S = InverseSeries[Series[gf, {x, 0, len + 1}], x]},
    Table[CoefficientList[(n + 1)! (1 - t)^(2 n + 1) Coefficient[S, x, n + 1], t],
    {n, 0, len}] // Flatten]; Revert[x + t - t Exp[x], 6]
  • PARI
    E2poly(n) = if(n == 0, 1, x*(x-1)^(2*n)*deriv((1-x)^(1-2*n)*E2poly(n-1)));
    { for(n = 0, 9, print(Vecrev(E2poly(n)))) }
    
  • PARI
    T(n, k) = sum(j=0, n-k, (-1)^(n-j)*binomial(2*n+1, j)*stirling(2*n-k-j+1, n-k-j+1, 1)); \\ Michel Marcus, Feb 11 2021
    
  • SageMath
    # See also link to notebook.
    @cached_function
    def E2(n, k):
        if n < 0: return 0
        if k == 0: return k^n
        return k * E2(n - 1, k) + (2*n - k) * E2(n - 1, k - 1)  # Peter Luschny, Mar 08 2025

Formula

E2(n, k) = E2(n-1, k)*k + E2(n-1, k-1)*(2*n - k) for n > 0 and 0 <= k <= n, and E2(0, 0) = 1; in all other cases E(n, k) = 0.
E2(n, k) = Sum_{j=0..n-k}(-1)^(n-j)*binomial(2*n+1, j)*Stirling1(2*n-k-j+1, n-k-j+1).
E2(n, k) = Sum_{j=0..k}(-1)^(k-j)*binomial(2*n + 1, k - j)*Stirling2(n + j, j).
Stirling1(x, x - n) = (-1)^n*Sum_{k=0..n} E2(n, k)*binomial(x + k - 1, 2*n).
Stirling2(x, x - n) = Sum_{k=0..n} E2(n, k)*binomial(x + n - k, 2*n).
E2poly(n, x) = Sum_{k=0..n} E2(n, k)*x^k, as row polynomials.
E2poly(n, x) = x*(x-1)^(2*n)*d_{x}((1-x)^(1-2*n)*E2poly(n-1)) for n>=1 and E2poly(0)=1.
E2poly(n, x) = (1 - x)^(2*n + 1)*Sum_{k=0..n}(k^(n + k)/k!)*(x*exp(-x))^k.
W(n, k) = [x^k] (1+x)^n*E2poly(n, x/(1 + x)) are the Ward numbers A269939.
E2(n, k) = [x^k] (1-x)^n*Wpoly(n, x/(1 - x)); Wpoly(n, x) = Sum_{k=0..n}W(n, k)*x^k.
W(n, k) = Sum_{j=0..k} E2(n, j)*binomial(n - j, n - k).
E2(n, k) = Sum_{j=0..k} (-1)^(k-j)*W(n, j)*binomial(n - j, k - j).
The compositional inverse with respect to x of x - t*(exp(x) - 1) (see B. Drake):
T(n, k) = [t^k](n+1)!*(1-t)^(2*n+1)*[x^(n+1)] InverseSeries(x - t*(exp(x)-1), x).
AS1(n, k) = Sum_{j=0..n-k} binomial(j, n-2*k)*E2(n-k, j+1), where AS1(n, k) are the associated Stirling numbers of the first kind (A008306, A106828).
E2(n, k) = Sum_{j=0..n-k+1} (-1)^(n-k-j+1)*AS1(n+j, j)*binomial(n-j, n-k-j+1), for n >= 1.
AS2(n, k) = Sum_{j=0..n-k} binomial(j, n-2*k)*E2(n-k, n-k-j) for n >=1, where AS2(n, k) are the associated Stirling numbers of the second kind (A008299, A137375).
E2(n, k) = Sum_{j=0..k} (-1)^(k-j)*AS2(n + j, j)*binomial(n - j, k - j).

A290694 Triangle read by rows, numerators of coefficients (in rising powers) of rational polynomials P(n, x) such that Integral_{x=0..1} P'(n, x) = Bernoulli(n, 1).

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 0, -1, 2, 0, 0, 1, -2, 3, 0, 0, -1, 14, -9, 24, 0, 0, 1, -10, 75, -48, 20, 0, 0, -1, 62, -135, 312, -300, 720, 0, 0, 1, -42, 903, -1680, 2800, -2160, 630, 0, 0, -1, 254, -1449, 40824, -21000, 27360, -17640, 4480
Offset: 0

Views

Author

Peter Luschny, Aug 24 2017

Keywords

Comments

Consider a family of integrals I_m(n) = Integral_{x=0..1} P'(n, x)^m with P'(n,x) = Sum_{k=0..n}(-1)^(n-k)*Stirling2(n, k)*k!*x^k (see A278075 for the coefficients).
I_1(n) are the Bernoulli numbers A164555/A027642, I_2(n) are the Bernoulli median numbers A212196/A181131, I_3(n) are the numbers A291449/A291450.
The coefficients of the polynomials P_n(x)^m are for m = 1 A290694/A290695 and for m = 2 A291447/A291448.
Only omega(Clausen(n)) = A001221(A160014(n,1)) = A067513(n) coefficients are rational numbers if n is even. For odd n > 1 there are two rational coefficients.
Let C_k(n) = [x^k] P_n(x), k > 0 and n even. Conjecture: k is a prime factor of Clausen(n) <=> k = denominator(C_k(n)) <=> k does not divide Stirling2(n, k-1)*(k-1)!. (Note that by a comment in A019538 Stirling2(n, k-1)*(k-1)! is the number of chain topologies on an n-set having k open sets.)

Examples

			Triangle starts:
[0, 1]
[0, 0,  1]
[0, 0, -1,   2]
[0, 0,  1,  -2,    3]
[0, 0, -1,  14,   -9,  24]
[0, 0,  1, -10,   75, -48,   20]
[0, 0, -1,  62, -135, 312, -300, 720]
The first few polynomials are:
P_0(x) = x.
P_1(x) =  (1/2)*x^2.
P_2(x) = -(1/2)*x^2 + (2/3)*x^3.
P_3(x) =  (1/2)*x^2 - 2*x^3 + (3/2)*x^4.
P_4(x) = -(1/2)*x^2 + (14/3)*x^3 - 9*x^4 + (24/5)*x^5.
P_5(x) =  (1/2)*x^2 - 10*x^3 + (75/2)*x^4 - 48*x^5 + 20*x^6.
P_6(x) = -(1/2)*x^2 + (62/3)*x^3 - 135*x^4 + 312*x^5 - 300*x^6 + (720/7)*x^7.
Evaluated at x = 1 this gives an additive decomposition of the Bernoulli numbers:
B(0) =     1 =    1.
B(1) =   1/2 =  1/2.
B(2) =   1/6 = -1/2 +  2/3.
B(3) =     0 =  1/2 -    2 + 3/2.
B(4) = -1/30 = -1/2 + 14/3 -    9 + 24/5.
B(5) =     0 =  1/2 -   10 + 75/2 -   48 +  20.
B(6) =  1/42 = -1/2 + 62/3 -  135 +  312 - 300 + 720/7.
		

Crossrefs

Programs

  • Maple
    BG_row := proc(m, n, frac, val) local F, g, v;
    F := (n, x) -> add((-1)^(n-k)*Stirling2(n,k)*k!*x^k, k=0..n):
    g := x -> int(F(n,x)^m, x):
    `if`(val = "val", subs(x=1, g(x)), [seq(coeff(g(x),x,j), j=0..m*n+1)]):
    `if`(frac = "num", numer(%), denom(%)) end:
    seq(BG_row(1, n, "num", "val"), n=0..16);         # A164555
    seq(BG_row(1, n, "den", "val"), n=0..16);         # A027642
    seq(print(BG_row(1, n, "num", "poly")), n=0..12); # A290694 (this seq.)
    seq(print(BG_row(1, n, "den", "poly")), n=0..12); # A290695
    # Alternatively:
    T_row := n -> numer(PolynomialTools:-CoefficientList(add((-1)^(n-j+1)*Stirling2(n, j-1)*(j-1)!*x^j/j, j=1..n+1), x)): for n from 0 to 6 do T_row(n) od;
  • Mathematica
    T[n_, k_] := If[k > 0, Numerator[StirlingS2[n, k - 1]*(k - 1)! / k], 0]; Table[T[n, k], {n, 0, 8}, {k, 0, n+1}] // Flatten

Formula

T(n, k) = Numerator(Stirling2(n, k - 1)*(k - 1)!/k) if k > 0 else 0; for n >= 0 and 0 <= k <= n+1.

A356601 Triangle read by rows. T(n, k) = denominator(Integral_{z=0..1} Eulerian(n, k)*z^(k + 1)*(z - 1)^(n - k - 1) dz), where Eulerian(n, k) = A173018(n, k), for n >= 1, and T(0, 0) = 1.

Original entry on oeis.org

1, 2, 1, 6, 3, 1, 12, 3, 4, 1, 20, 30, 20, 5, 1, 30, 30, 10, 15, 6, 1, 42, 35, 70, 105, 14, 7, 1, 56, 7, 280, 35, 56, 7, 8, 1, 72, 252, 56, 630, 504, 28, 72, 9, 1, 90, 180, 105, 630, 126, 420, 45, 45, 10, 1, 110, 495, 33, 1155, 1386, 1155, 165, 99, 110, 11, 1
Offset: 0

Views

Author

Peter Luschny, Aug 15 2022

Keywords

Examples

			Triangle T(n, k) starts:
[0]  1;
[1]  2,   1;
[2]  6,   3,   1;
[3] 12,   3,   4,   1;
[4] 20,  30,  20,   5,   1;
[5] 30,  30,  10,  15,   6,   1;
[6] 42,  35,  70, 105,  14,   7,  1;
[7] 56,   7, 280,  35,  56,   7,  8,  1;
[8] 72, 252,  56, 630, 504,  28, 72,  9,  1;
[9] 90, 180, 105, 630, 126, 420, 45, 45, 10,  1;
The Bernoulli numbers (with B(1) = 1/2) are the row sums of the fractions.
[0]   1                                              =     1;
[1] + 1/2                                            =   1/2;
[2] - 1/6  +  1/3                                    =   1/6;
[3] + 1/12 -  1/3  +    1/4                          =     0;
[4] - 1/20 + 11/30 -  11/20 +   1/5                  = -1/30;
[5] + 1/30 - 13/30 +  11/10 -  13/15  +   1/6        =     0;
[6] - 1/42 + 19/35 - 151/70 + 302/105 - 19/14 + 1/7  =  1/42;
		

Crossrefs

Cf. A356602 (numerator), A173018, A278075, A356545, A356547.

Programs

  • Maple
    E1 := proc(n, k) combinat:-eulerian1(n, k) end:
    Trow := proc(n, z) if n = 0 then return 1 fi;
    seq(denom(int(E1(n, k)*z^(k + 1)*(z - 1)^(n - k - 1), z=0..1)), k=0..n) end:
    for n from 0 to 9 do Trow(n, z) od;
  • Mathematica
    Unprotect[Power]; Power[0, 0] = 1;
    E1[n_, k_] /; n == k = 0^k; E1[n_, k_] /; k < 0 || k > n = 0;
    E1[n_, k_] := E1[n, k] = (k + 1)*E1[n - 1, k] + (n - k)*E1[n - 1, k - 1];
    T[n_, k_] /; n == k = 0^k;
    T[n_, k_] := (-1)^(k - n + 1)*E1[n, k]*Gamma[k + 2]*Gamma[n - k]/Gamma[n + 2];
    Table[Denominator[T[n, k]], {n, 0, 8}, {k, 0, n}] // TableForm

Formula

R(n, k) = (-1)^(k - n + 1)*Eulerian(n, k)*Gamma(k + 2)*Gamma(n - k)/Gamma(n + 2) for 0 <= k < n, and T(n, n) = 0^n.
Bernoulli(n) = Sum_{k=0..n} R(n, k), where Bernoulli(1) = 1/2.
T(n, k) = denominator(R(n, k)).

A356602 Triangle read by rows. T(n, k) = numerator(Integral_{z=0..1} Eulerian(n, k)*z^(k + 1)*(z - 1)^(n - k - 1) dz), where Eulerian(n, k) = A173018(n, k) for n >= 1, and T(0, 0) = 1.

Original entry on oeis.org

1, 1, 0, -1, 1, 0, 1, -1, 1, 0, -1, 11, -11, 1, 0, 1, -13, 11, -13, 1, 0, -1, 19, -151, 302, -19, 1, 0, 1, -5, 1191, -302, 397, -15, 1, 0, -1, 247, -477, 15619, -15619, 477, -247, 1, 0, 1, -251, 1826, -44117, 15619, -44117, 1826, -251, 1, 0
Offset: 0

Views

Author

Peter Luschny, Aug 15 2022

Keywords

Examples

			Triangle T(n, k) starts:
[0]  1;
[1]  1,    0;
[2] -1,    1,    0;
[3]  1,   -1,    1,      0;
[4] -1,   11,  -11,      1,      0;
[5]  1,  -13,   11,    -13,      1,      0;
[6] -1,   19, -151,    302,    -19,      1,    0;
[7]  1,   -5, 1191,   -302,    397,    -15,    1,    0;
[8] -1,  247, -477,  15619, -15619,    477, -247,    1,  0;
[9]  1, -251, 1826, -44117,  15619, -44117, 1826, -251,  1,  0;
The Bernoulli numbers (with B(1) = 1/2) are the row sums of the fractions.
[0]   1                                              =     1;
[1] + 1/2                                            =   1/2;
[2] - 1/6  +  1/3                                    =   1/6;
[3] + 1/12 -  1/3  +    1/4                          =     0;
[4] - 1/20 + 11/30 -  11/20 +   1/5                  = -1/30;
[5] + 1/30 - 13/30 +  11/10 -  13/15  +   1/6        =     0;
[6] - 1/42 + 19/35 - 151/70 + 302/105 - 19/14 + 1/7  =  1/42;
		

Crossrefs

Cf. A356601 (denominator), A173018, A278075, A356545, A356547.

Programs

  • Maple
    E1 := proc(n, k) combinat:-eulerian1(n, k) end:
    Trow := proc(n, z) if n = 0 then return 1 fi;
    seq(numer(int(E1(n, k)*z^(k + 1)*(z - 1)^(n - k - 1), z=0..1)), k=0..n) end:
    for n from 0 to 9 do Trow(n, z) od;
  • Mathematica
    Unprotect[Power]; Power[0, 0] = 1;
    E1[n_, k_] /; n == k = 0^k; E1[n_, k_] /; k < 0 || k > n = 0;
    E1[n_, k_] := E1[n, k] = (k + 1)*E1[n - 1, k] + (n - k)*E1[n - 1, k - 1];
    T[n_, k_] /; n == k = 0^k;
    T[n_, k_] := (-1)^(k - n + 1)*E1[n, k]*Gamma[k + 2]*Gamma[n - k]/Gamma[n + 2];
    Table[Numerator[T[n, k]], {n, 0, 8}, {k, 0, n}] // TableForm

Formula

R(n, k) = (-1)^(k - n + 1)*Eulerian(n, k)*Gamma(k + 2)*Gamma(n - k)/Gamma(n + 2) for 0 <= k < n, and T(n, n) = 0^n.
Bernoulli(n) = Sum_{k=0..n} R(n, k), where Bernoulli(1) = 1/2.
T(n, k) = numerator(R(n, k)).

A290696 Triangle read by rows, T(n, k) = [x^k](Sum_{k=0..n}(-1)^(n-k)*Stirling2(n, k)*k!* x^k)^2, for 0 <= k <= 2n.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, -4, 4, 0, 0, 1, -12, 48, -72, 36, 0, 0, 1, -28, 268, -1056, 1968, -1728, 576, 0, 0, 1, -60, 1200, -9480, 37140, -79200, 93600, -57600, 14400, 0, 0, 1, -124, 4924, -70080, 488640, -1909440, 4466880, -6393600, 5486400, -2592000, 518400
Offset: 0

Views

Author

Peter Luschny, Aug 25 2017

Keywords

Comments

Without squaring the sum in the definition one gets for the polynomials:
Integral_{x=0..1} P(n, x) = Bernoulli(n, 1) = A164555(n)/A027642(n).

Examples

			Triangle starts:
[1]
[0, 0, 1]
[0, 0, 1,  -4,    4]
[0, 0, 1, -12,   48,   -72,    36]
[0, 0, 1, -28,  268, -1056,  1968,  -1728,   576]
[0, 0, 1, -60, 1200, -9480, 37140, -79200, 93600, -57600, 14400]
The first few polynomials:
P_0(x) = 1
P_1(x) = x^2
P_2(x) = x^2 -  4*x^3 +   4*x^4
P_3(x) = x^2 - 12*x^3 +  48*x^4 -   72*x^5 +   36*x^6
P_4(x) = x^2 - 28*x^3 + 268*x^4 - 1056*x^5 + 1968*x^6 - 1728*x^7 + 576*x^8
		

Crossrefs

Programs

  • Maple
    P := (n, x) -> add((-1)^(n-k)*Stirling2(n,k)*k!*x^k, k=0..n)^2;
    for n from 0 to 6 do seq(coeff(P(n, x), x, k), k=0..2*n) od;

Formula

Integral_{x=0..1} P(n, x) = BernoulliMedian(n) = A212196(n)/A181131(n).

A344913 Table read by rows, T(n, k) (for 0 <= k <= n) = (-2)^(n - k)*k!*Stirling2(n, k).

Original entry on oeis.org

1, 0, 1, 0, -2, 2, 0, 4, -12, 6, 0, -8, 56, -72, 24, 0, 16, -240, 600, -480, 120, 0, -32, 992, -4320, 6240, -3600, 720, 0, 64, -4032, 28896, -67200, 67200, -30240, 5040, 0, -128, 16256, -185472, 653184, -1008000, 766080, -282240, 40320
Offset: 0

Views

Author

Peter Luschny, Aug 14 2021

Keywords

Examples

			Table starts:
[0] 1;
[1] 0,    1;
[2] 0,   -2,     2;
[3] 0,    4,   -12,       6;
[4] 0,   -8,    56,     -72,     24;
[5] 0,   16,  -240,     600,   -480,      120;
[6] 0,  -32,   992,   -4320,   6240,    -3600,    720;
[7] 0,   64, -4032,   28896, -67200,    67200, -30240,    5040;
[8] 0, -128, 16256, -185472, 653184, -1008000, 766080, -282240, 40320.
		

Crossrefs

Cf. A155585 (row sums), A122704 (alternating row sums, signed), A278075 (signed Fubini polynomials), A000142 (main diagonal), A048993 (Stirling2).

Programs

  • Maple
    T := (n, k) -> (-2)^(n - k)*k!*Stirling2(n, k):
    seq(seq(T(n, k), k = 0..n), n = 0..9);
  • PARI
    T(n, k) = (-2)^(n - k)*k!*stirling(n, k, 2); \\ Michel Marcus, Aug 14 2021

Formula

T(n, k) = 2^(n - k)*Sum_{j=0..n} (-1)^(n - j)*binomial(k, j)*j^n.
Let row(n, x) be the n-th row polynomial, then B(n) = row(n-1, 1)*n / (4^n - 2^n) is the n-th Bernoulli number (with B(1) = 1/2) for n >= 1.
Showing 1-8 of 8 results.