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.

A039621 Triangle of Lehmer-Comtet numbers of 2nd kind.

Original entry on oeis.org

1, -1, 1, 4, -3, 1, -27, 19, -6, 1, 256, -175, 55, -10, 1, -3125, 2101, -660, 125, -15, 1, 46656, -31031, 9751, -1890, 245, -21, 1, -823543, 543607, -170898, 33621, -4550, 434, -28, 1, 16777216, -11012415, 3463615, -688506, 95781, -9702, 714, -36, 1
Offset: 1

Views

Author

Keywords

Comments

Also the Bell transform of (-n)^n adding 1,0,0,0,... as column 0. For the definition of the Bell transform see A264428. - Peter Luschny, Jan 16 2016

Examples

			The triangle T(n, k) begins:
[1]       1;
[2]      -1,      1;
[3]       4,     -3,       1;
[4]     -27,     19,      -6,     1;
[5]     256,   -175,      55,   -10,     1;
[6]   -3125,   2101,    -660,   125,   -15,   1;
[7]   46656, -31031,    9751, -1890,   245, -21,   1;
[8] -823543, 543607, -170898, 33621, -4550, 434, -28, 1;
		

Crossrefs

A008296 (matrix inverse), A354794 (variant), A045531 (column |a(n, 2)|).
Cf. A185164.

Programs

  • Maple
    R := proc(n, k, m) option remember;
       if k < 0  or n < 0 then 0 elif k = 0 then 1 else
       m*R(n, k-1, m) + R(n-1, k, m+1) fi end:
    A039621 := (n, k) -> (-1)^(n-k)*R(k-1, n-k, n-k):
    seq(seq(A039621(n, k), k = 1..n), n = 1..9); # Peter Luschny, Jun 10 2022 after Vladimir Kruchinin
  • Mathematica
    a[1, 1] = 1; a[n_, k_] := 1/(k-1)! Sum[((-1)^(n-k-i)*Binomial[k-1, i]*(n-i-1)^(n-1)), {i, 0, k-1}];
    Table[a[n, k], {n, 1, 10}, {k, 1, n}]//Flatten (* Jean-François Alcover, Jun 03 2019 *)
  • Maxima
    T(n,k,m):=if k<0 or n<0 then 0 else if k=0 then 1 else m*T(n,k-1,m)+T(n-1,k,m+1);
    a(n,k):=if nVladimir Kruchinin, Mar 07 2020
  • PARI
    tabl(nn) = {for (n = 1, nn, for (k = 1, n, print1(sum(i = 0, k-1,(-1)^(n-k-i)*binomial(k-1, i)*(n-i-1)^(n-1))/(k-1)!, ", ");); print(););} \\ Michel Marcus, Aug 28 2013
    
  • 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: (-n)^n, 7) # Peter Luschny, Jan 16 2016
    

Formula

(k-1)!*a(n, k) = Sum_{i=0..k-1}((-1)^(n-k-i)*binomial(k-1, i)*(n-i-1)^(n-1)).
a(n,k) = (-1)^(n-k)*T(k,n-k,n-k), n>=k, where T(n,k,m)=m*T(n,m-1,k)+T(n-1,k,m+1), T(n,0,m)=1. - Vladimir Kruchinin, Mar 07 2020