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

A008296 Triangle of Lehmer-Comtet numbers of the first kind.

Original entry on oeis.org

1, 1, 1, -1, 3, 1, 2, -1, 6, 1, -6, 0, 5, 10, 1, 24, 4, -15, 25, 15, 1, -120, -28, 49, -35, 70, 21, 1, 720, 188, -196, 49, 0, 154, 28, 1, -5040, -1368, 944, 0, -231, 252, 294, 36, 1, 40320, 11016, -5340, -820, 1365, -987, 1050, 510, 45, 1, -362880, -98208, 34716, 9020, -7645, 3003, -1617, 2970, 825, 55, 1, 3628800
Offset: 1

Views

Author

Keywords

Comments

Triangle arising in the expansion of ((1+x)*log(1+x))^n.
Also the Bell transform of (-1)^(n-1)*(n-1)! if n>1 else 1 adding 1,0,0,0,... as column 0. For the definition of the Bell transform see A264428. - Peter Luschny, Jan 16 2016

Examples

			Triangle begins:
   1;
   1,  1;
  -1,  3,   1;
   2, -1,   6,  1;
  -6,  0,   5, 10,  1;
  24,  4, -15, 25, 15, 1;
  ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 139.

Crossrefs

Cf. A039621 (second kind), A354795 (variant), A185164, A005727 (row sums), A298511 (central).
Columns: A045406 (column 2), A347276 (column 3), A345651 (column 4).
Diagonals: A000142, A000217, A059302.
Cf. A176118.

Programs

  • Maple
    for n from 1 to 20 do for k from 1 to n do
    printf(`%d,`, add(binomial(l,k)*k^(l-k)*Stirling1(n,l), l=k..n)) od: od:
    # second program:
    A008296 := proc(n, k) option remember; if k=1 and n>1 then (-1)^n*(n-2)! elif n=k then 1 else (n-1)*procname(n-2, k-1) + (k-n+1)*procname(n-1, k) + procname(n-1, k-1) end if end proc:
    seq(print(seq(A008296(n, k), k=1..n)), n=1..7); # Mélika Tebni, Aug 22 2021
  • Mathematica
    a[1, 1] = a[2, 1] = 1; a[n_, 1] = (-1)^n (n-2)!;
    a[n_, n_] = 1; a[n_, k_] := a[n, k] = (n-1) a[n-2, k-1] + a[n-1, k-1] + (k-n+1) a[n-1,k]; Flatten[Table[a[n, k], {n, 1, 12}, {k, 1, n}]][[1 ;; 67]]
    (* Jean-François Alcover, Apr 29 2011 *)
  • PARI
    {T(n, k) = if( k<1 || k>n, 0, n! * polcoeff(((1 + x) * log(1 + x + x * O(x^n)))^k / k!, n))}; /* Michael Somos, Nov 15 2002 */
    
  • Sage
    # uses[bell_matrix from A264428]
    # Adds 1, 0, 0, 0, ... as column 0 at the left side of the triangle.
    bell_matrix(lambda n: (-1)^(n-1)*factorial(n-1) if n>1 else 1, 7) # Peter Luschny, Jan 16 2016

Formula

E.g.f. for a(n, k): (1/k!)[ (1+x)*log(1+x) ]^k. - Len Smiley
Left edge is (-1)*n!, for n >= 2. Right edge is all 1's.
a(n+1, k) = n*a(n-1, k-1) + a(n, k-1) + (k-n)*a(n, k).
a(n, k) = Sum_{m} binomial(m, k)*k^(m-k)*Stirling1(n, m).
From Peter Bala, Mar 14 2012: (Start)
E.g.f.: exp(t*(1 + x)*log(1 + x)) = Sum_{n>=0} R(n,t)*x^n/n! = 1 + t*x + (t+t^2)x^2/2! + (-t+3*t^2+t^3)x^3/3! + .... Cf. A185164. The row polynomials R(n,t) are of binomial type and satisfy the recurrence R(n+1,t) = (t-n)*R(n,t) + t*d/dt(R(n,t)) + n*t*R(n-1,t) with R(0,t) = 1 and R(1,t) = t. Inverse array is A039621.
(End)
Sum_{k=0..n} (-1)^k * a(n,k) = A176118(n). - Alois P. Heinz, Aug 25 2021

Extensions

More terms from James Sellers, Jan 26 2001
Edited by N. J. A. Sloane at the suggestion of Andrew Robbins, Dec 11 2007

A354795 Triangle read by rows. The matrix inverse of A354794. Equivalently, the Bell transform of cfact(n) = -(n - 1)! if n > 0 and otherwise 1/(-n)!.

Original entry on oeis.org

1, 0, 1, 0, -1, 1, 0, -1, -3, 1, 0, -2, -1, -6, 1, 0, -6, 0, 5, -10, 1, 0, -24, 4, 15, 25, -15, 1, 0, -120, 28, 49, 35, 70, -21, 1, 0, -720, 188, 196, 49, 0, 154, -28, 1, 0, -5040, 1368, 944, 0, -231, -252, 294, -36, 1, 0, -40320, 11016, 5340, -820, -1365, -987, -1050, 510, -45, 1
Offset: 0

Views

Author

Peter Luschny, Jun 09 2022

Keywords

Comments

The triangle is the matrix inverse of the Bell transform of n^n (A354794).
The numbers (-1)^(n-k)*T(n, k) are known as the Lehmer-Comtet numbers of 1st kind (A008296).
The function cfact is the 'complementary factorial' (name is ad hoc) and written \hat{!} in TeX mathmode. 1/(cfact(-n) * cfact(n)) = signum(-n) * n for n != 0. It is related to the Roman factorial (A159333). The Bell transform of the factorial are the Stirling cycle numbers (A132393).

Examples

			Triangle T(n, k) begins:
[0] [1]
[1] [0,     1]
[2] [0,    -1,    1]
[3] [0,    -1,   -3,   1]
[4] [0,    -2,   -1,  -6,   1]
[5] [0,    -6,    0,   5, -10,    1]
[6] [0,   -24,    4,  15,  25,  -15,    1]
[7] [0,  -120,   28,  49,  35,   70,  -21,   1]
[8] [0,  -720,  188, 196,  49,    0,  154, -28,   1]
[9] [0, -5040, 1368, 944,   0, -231, -252, 294, -36, 1]
		

References

  • Louis Comtet, Advanced Combinatorics. Reidel, Dordrecht, 1974, p. 139-140.

Crossrefs

Cf. A354794 (matrix inverse), A176118 (row sums), A005727 (alternating row sums), A045406 (column 2), A347276 (column 3), A345651 (column 4), A298511 (central), A008296 (variant), A159333, A264428, A159075, A006963, A354796.

Programs

  • Maple
    # The function BellMatrix is defined in A264428.
    cfact := n -> ifelse(n = 0, 1, -(n - 1)!): BellMatrix(cfact, 10);
    # Alternative:
    t := proc(n, k) option remember; if k < 0 or n < 0 then 0 elif k = n then 1 else (n-1)*t(n-2, k-1) - (n-1-k)*t(n-1, k) + t(n-1, k-1) fi end:
    T := (n, k) -> (-1)^(n-k)*t(n, k):
    seq(print(seq(T(n, k), k = 0..n)), n = 0..9);
    # Using the e.g.f.:
    egf := (1 - x)^(t*(x - 1)):
    ser := series(egf, x, 11): coeffx := n -> coeff(ser, x, n):
    row := n -> seq(n!*coeff(coeffx(n), t, k), k=0..n):
    seq(print(row(n)), n = 0..9);
  • Mathematica
    cfact[n_] := If[n == 0, 1, -(n - 1)!];
    R := Range[0, 10]; cf := Table[cfact[n], {n, R}];
    Table[BellY[n, k, cf], {n, R}, {k, 0, n}] // Flatten

Formula

T(n, k) = n!*[t^k][x^n] (1 - x)^(t*(x - 1)).
T(n, k) = Sum_{j=k..n} (-1)^(n-k)*binomial(j, k)*k^(j-k)*Stirling1(n, j).
T(n, k) = Bell_{n, k}(a), where Bell_{n, k} is the partial Bell polynomial evaluated over the sequence a = {cfact(m) | m >= 0}, (see Mathematica).
T(n, k) = (-1)^(n-k)*t(n, k) where t(n, n) = 1 and t(n, k) = (n-1)*t(n-2, k-1) - (n-1-k)*t(n-1, k) + t(n-1, k-1) for k > 0 and n > 0.
Let s(n) = (-1)^n*Sum_{k=1..n} (k-1)^(k-1)*T(n, k) for n >= 0, then s = A159075.
Sum_{k=1..n} (k + x)^(k-1)*T(n, k) = binomial(n + x - 1, n-1)*(n-1)! for n >= 1. Note that for x = k this is A354796(n, k) for 0 <= k <= n and implies in particular for x = n >= 1 the identity Sum_{k=1..n} (k + n)^(k - 1)*T(n, k) = Gamma(2*n)/n! = A006963(n+1).
E.g.f. of column k >= 0: ((1 - t) * log(1 - t))^k / ((-1)^k * k!). - Werner Schulte, Jun 14 2022

A345651 Fourth column of A008296.

Original entry on oeis.org

1, 10, 25, -35, 49, 0, -820, 9020, -87164, 859144, -8965320, 100136400, -1199838576, 15406135488, -211479420096, 3094582896000, -48129022468224, 793274283938304, -13818265424460288, 253731538514893824, -4899371564756837376, 99261476593521868800
Offset: 4

Views

Author

Luca Onnis, Aug 26 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=k, 1, `if`(k=0, 0,
          (n-1)*b(n-2, k-1)+b(n-1, k-1)+(k-n+1)*b(n-1, k)))
        end:
    a:= n-> b(n, 4):
    seq(a(n), n=4..28);  # Alois P. Heinz, Aug 26 2021
    # alternative
    seq(A008296(n,4),n=4..70) ; # R. J. Mathar, Sep 15 2021
  • Mathematica
    a[1, 1] = a[2, 1] = 1; a[n_, 1] = (-1)^n (n - 2)!;
    a[n_, n_] = 1;
    a[n_, k_] := a[n, k] = (n - 1) a[n - 2, k - 1] +
        a[n - 1, k - 1] + (k - n + 1) a[n - 1, k];
    Flatten[Table[N[a[n + 4, 4], 10], {n, 1, 400}]]
  • PARI
    a(n) = sum(m=4, n, binomial(m, 4)*4^(m-4)*stirling(n, m, 1)); \\ Michel Marcus, Sep 14 2021

Formula

a(n) = A008296(n,4).
a(n) = (-1)^n*(4*H(n-5,1)^3 + 8*H(n-5,3) - 12*H(n-5,2)*H(n-5,1) - 25*H(n-5,1)^2 + 25*H(n-5,2) + 35*H(n-5,1) - 10)*(n-5)! for n >= 5 where H(n,1) = Sum_{j=1..n} 1/j is the n-th harmonic number, H(n,2) = Sum_{j=1..n} 1/j^2 and H(n,3) = Sum_{j=1..n} 1/j^3.
a(n) = Sum_{m=4..n} binomial(m,4) * 4^(m-4) * Stirling1(n,m). - Alois P. Heinz, Aug 26 2021
Conjecture: D-finite with recurrence a(n) +2*(2*n-13)*a(n-1) +(6*n^2-84*n+295)*a(n-2) +(2*n-15)*(2*n^2-30*n+113)*a(n-3) +(n-8)^4*a(n-4)=0. - R. J. Mathar, Sep 15 2021

A347276 Third column of A008296.

Original entry on oeis.org

1, 6, 5, -15, 49, -196, 944, -5340, 34716, -254760, 2078856, -18620784, 180973584, -1887504768, 20887922304, -242111586816, 2889841121280, -34586897978880, 393722260047360, -3659128846433280, 5687630494110720, 1137542166526464000, -49644151627682304000
Offset: 3

Views

Author

Luca Onnis, Aug 25 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=k, 1, `if`(k=0, 0,
          (n-1)*b(n-2, k-1)+b(n-1, k-1)+(k-n+1)*b(n-1, k)))
        end:
    a:= n-> b(n, 3):
    seq(a(n), n=3..30);  # Alois P. Heinz, Aug 25 2021
  • Mathematica
    a[1, 1] = a[2, 1] = 1; a[n_, 1] = (-1)^n (n - 2)!;
    a[n_, n_] = 1;
    a[n_, k_] :=  a[n, k] = (n - 1) a[n - 2, k - 1] +
        a[n - 1, k - 1] + (k - n + 1) a[n - 1, k];
    Flatten[Table[a[n + 3, 3], {n, 0, 30}]]
  • PARI
    a(n) = sum(m=3, n, binomial(m, 3)*3^(m-3)*stirling(n, m, 1)); \\ Michel Marcus, Sep 14 2021

Formula

a(n) = A008296(n,3).
a(n) = (-1)^n*(3*H(n-4,1)^2 - 3*H(n-4,2) - 11*H(n-4,1) + 6)*(n-4)! for n >= 4, where H(n,1) = Sum_{j=1..n} 1/j = A001008(n)/A002805(n) is the n-th harmonic number and H(n,2) = Sum_{j=1..n} 1/j^2 = A007406(n)/A007407(n).
a(n) = Sum_{m=3..n} binomial(m,3) * 3^(m-3) * Stirling1(n,m). - Alois P. Heinz, Aug 26 2021

A323618 Expansion of e.g.f. (1 + x)*log(1 + x)*(2 + log(1 + x))/2.

Original entry on oeis.org

0, 1, 2, -1, 1, -1, -2, 34, -324, 2988, -28944, 300816, -3371040, 40710240, -528439680, 7348717440, -109109064960, 1723814265600, -28888702617600, 512030734387200, -9572240647065600, 188274945999974400, -3887144020408320000, 84062926436751360000, -1900475323780239360000
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 20 2019

Keywords

Crossrefs

Programs

  • Magma
    [(&+[StirlingFirst(n,k)*Binomial(k+1,2): k in [0..n]]): n in [0..25]]; // G. C. Greubel, Feb 07 2019
    
  • Maple
    f:= gfun:-rectoproc({a(n) =  (5-2*n)*a(n-1) - (n-3)^2*a(n-2), a(0)=0, a(1)=1, a(2)=2, a(3)=-1}, a(n), remember):
    map(f, [$0..30]); # Robert Israel, Jan 20 2019
  • Mathematica
    nmax = 24; CoefficientList[Series[(1 + x) Log[1 + x] (2 + Log[1 + x])/2, {x, 0, nmax}], x] Range[0, nmax]!
    Table[Sum[StirlingS1[n, k] k (k + 1)/2, {k, 0, n}], {n, 0, 24}]
    Join[{0,1,2,-1}, RecurrenceTable[{a[n]==(5-2*n)*a[n-1]-(n-3)^2*a[n-2], a[2]==2, a[3]==-1}, a, {n,4,25}]] (* G. C. Greubel, Feb 07 2019 *)
  • PARI
    {a(n) = sum(k=0,n, stirling(n,k,1)*binomial(k+1,2))};
    vector(30, n, n--; a(n)) \\ G. C. Greubel, Feb 07 2019
    
  • Sage
    [sum((-1)^(k+n)*stirling_number1(n,k)*binomial(k+1,2) for k in (0..n)) for n in (0..25)] # G. C. Greubel, Feb 07 2019

Formula

a(n) = Sum_{k=0..n} Stirling1(n,k)*A000217(k).
a(n) ~ -(-1)^n * log(n) * n! / n^2 * (1 + (gamma - 2)/log(n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 20 2019
a(n) = (5-2*n)*a(n-1) - (n-3)^2*a(n-2) for n >= 4. - Robert Israel, Jan 20 2019

A372803 Expansion of e.g.f. exp(1 - exp(-x)) * (exp(-x) - 1) * (exp(-x) - 2).

Original entry on oeis.org

0, 1, 3, -2, -11, 31, 14, -349, 1047, 820, -21265, 90355, -26352, -2086083, 14092615, -32449650, -241320287, 3080629195, -15455723498, -2456654665, 760213889483, -7097893818852, 28459679925187, 125560349169887, -3153253543188992, 26852335900600041, -86130449768002245
Offset: 0

Views

Author

Ilya Gutkovskiy, May 14 2024

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 26; CoefficientList[Series[Exp[1 - Exp[-x]] (Exp[-x] - 1) (Exp[-x] - 2), {x, 0, nmax}], x] Range[0, nmax]!
    Table[Sum[(-1)^(n - k) StirlingS2[n, k] k^2, {k, 0, n}], {n, 0, 26}]

Formula

G.f.: Sum_{k>=0} k^2 * x^k / Product_{j=0..k} (1 + j*x).
a(n) = Sum_{k=0..n} (-1)^(n-k) * Stirling2(n,k) * k^2.
Showing 1-6 of 6 results.