Lah numbers, sometimes referred to as Stirling numbers of the third kind, are coefficients of polynomial expansions expressing rising factorials in terms of falling factorials.

Unsigned Lah numbers count the number of ways a set of n elements can be partitioned into k non-empty linearly ordered subsets.

Lah numbers are closely related to Stirling numbers of the first & second kinds, and may be derived from them.

Lah numbers obey the identities and relations:

  L(n, 0), L(0, k) = 0   # for n, k > 0
  L(n, n) = 1
  L(n, 1) = n!
  L(n, k) =           ( n! * (n - 1)! ) / ( k! * (k - 1)! ) / (n - k)!      # For unsigned Lah numbers
     or
  L(n, k) = (-1)**n * ( n! * (n - 1)! ) / ( k! * (k - 1)! ) / (n - k)!      # For   signed Lah numbers

Task

 Write a routine (function, procedure, whatever) to find unsigned Lah numbers. There are several methods to generate unsigned Lah numbers. You are free to choose the most appropriate for your language. If your language has a built-in, or easily, publicly available library implementation, it is acceptable to use that.
 Using the routine, generate and show here, on this page, a table (or triangle) showing the unsigned Lah numbers, L(n, k), up to L(12, 12). it is optional to show the row / column for n == 0 and k == 0. It is optional to show places where L(n, k) == 0 (when k > n).
 If your language supports large integers, find and show here, on this page, the maximum value of L(n, k) where n == 100.


See also

 Wikipedia - Lah number
 OEIS:A105278 - Unsigned Lah numbers
 OEIS:A008297 - Signed Lah numbers


Related Tasks

 Stirling numbers of the first kind
 Stirling numbers of the second kind
 Bell numbers


' Lah numbers - VBScript - 04/02/2021

    Function F(i,n)
        Dim c: c=CCur(i): If n>Len(c) Then F=Space(n-Len(c))&c Else F=c
    End Function 'F

    Function Fact(ByVal n)
        Dim res
        If n=0 Then
            Fact = 1
        Else
            res = 1
            While n>0
                res = res*n
                n = n-1
            Wend
            Fact = res
        End If
    End Function 'Fact
 
    Function Lah(n, k)
        If k=1 Then
            Lah = Fact(n)
        ElseIf k=n Then
            Lah = 1
        ElseIf k>n Then
            Lah=0
        ElseIf k < 1 Or n < 1 Then
            Lah = 0
        Else
            Lah = (Fact(n) * Fact(n-1)) / (Fact(k) * Fact(k-1)) / Fact(n-k)
        End If
    End Function 'Lah
 
    Sub Main()
        ns=12: p=10
        WScript.Echo "Unsigned Lah numbers: Lah(n,k):"
        buf = "n/k "
        For k=1 To ns
           buf = buf & F(k,p) & " "
        Next 'k
        WScript.Echo buf
        For n=1 To ns
           buf = F(n,3) & " "
            For k=1 To n
                l = Lah(n,k)
                buf = buf & F(l,p) & " "
            Next 'k
            WScript.Echo buf
        Next 'n
    End Sub 'Main

    Main() 