Lah numbers: Difference between revisions

m
elided extra blank lines from the formula section, added whitespace.
m (elided extra blank lines from the formula section, added whitespace.)
Line 6:
Lah numbers are closely related to Stirling numbers of the first & second kinds, and may be derived from them.
 
Lah numbers obey thethese identities and relations: <big>
L(n, 0), L(0, k) = 0 # for n, k > 0
 
L(n, 0), L(0, kn) = 0 # for n, k > 01
L(n, n1) = 1n!
L(n, k) = ( n! * (n - 1)! ) / ( k! * (k - 1)! ) / (n - k)! # For unsigned Lah numbers
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 </big>
 
 
;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.