37 lines
1.9 KiB
Text
37 lines
1.9 KiB
Text
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:
|
|
|
|
:* '''[[wp:Lah_number|Wikipedia - Lah number]]'''
|
|
:* '''[[oeis:A105278|OEIS:A105278 - Unsigned Lah numbers]]'''
|
|
:* '''[[oeis:A008297|OEIS:A008297 - Signed Lah numbers]]'''
|
|
|
|
|
|
;Related Tasks:
|
|
|
|
:* '''[[Stirling_numbers_of_the_first_kind|Stirling numbers of the first kind]]'''
|
|
:* '''[[Stirling_numbers_of_the_second_kind|Stirling numbers of the second kind]]'''
|
|
:* '''[[Bell_numbers|Bell numbers]]'''
|
|
|
|
<br><br>
|
|
|