n_compositions Function

public elemental function n_compositions(k, n) result(res)

Return the number of compositions for k summands and a sum of n

A composition is a solution to the integer equation with .

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: k
integer, intent(in) :: n

Return Value integer(kind=int64)


Contents