fast-arithmetic-0.6.4.2: Fast functions on integers.

Numeric.Combinatorics

Description

This provides facilities for working with common combinatorial functions.

Synopsis

# Documentation

$$\binom{n}{k}$$

$$n!!$$

The nth Catalan number, with indexing beginning at 0.

λ:> catalan <$> [0..9] [1,1,2,5,14,42,132,429,1430,4862] $$!n$$ λ:> derangement <$> [0..10]
[1,0,1,2,9,44,265,1854,14833,133496,1334961]

Arguments

 :: Int $$n$$ -> Integer

Compute the maximal number of regions obtained by joining $$n$$ points about a circle by straight lines. See here.

Stirling numbers of the second kind.