Skip to contents

C(n,k) = C(n-1,k-1) + C(n-2,k-1) + ... + C(k-1,k-1), eq (1.29), copied as eq (1.56) inside the stars-and-bars induction.

Usage

HockStick(n, k)

Arguments

n, k

requires 1 <= k <= n.

Value

list(n, k, stick_sum, closed_form, n_terms, forms_agree).

References

Morin, D. J. (2016). Probability: For the Enthusiastic Beginner. Createspace. Eqs. (1.29), (1.56).

Examples

HockStick(6, 3)$stick_sum
#> [1] 20