File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -352,12 +352,15 @@ end
352352"""
353353 stirlings1(n::Int, k::Int, signed::Bool=false)
354354
355- Compute the Stirling number of the first kind, ``s(n,k)``.
355+ Compute the Stirling number of the first kind, ``s(n,k)``, for non-negative `n` .
356356
357357If `signed` is `true`, return the signed value ``(-1)^{n-k} s(n,k)``.
358358
359359# Examples
360360```jldoctest
361+ julia> stirlings1(0, 0)
362+ 1
363+
361364julia> stirlings1(5, 5) # s(n, n) = 1
3623651
363366
370373julia> stirlings1(6, 3, true)
371374-225
372375
373- julia> [(k<=n ? stirlings1(n,k,true) : 0 ) for n in 1:6, k in 1:6]
376+ julia> [stirlings1(n,k,true) for n in 1:6, k in 1:6]
3743776×6 Matrix{Int64}:
375378 1 0 0 0 0 0
376379 -1 1 0 0 0 0
419422"""
420423 stirlings2(n::Int, k::Int)
421424
422- Compute the Stirling number of the second kind, ``S(n,k)``.
425+ Compute the Stirling number of the second kind, ``S(n,k)``, for non-negative `n` .
423426
424427# Examples
425428```jldoctest
You can’t perform that action at this time.
0 commit comments