Catalan, Stirling, Bell and Partition Numbers Calculator

Choose a sequence and enter n, and k where it is needed.

A whole number, 0 or more.

A whole number from 0 to n.

Try

Result

You enteredn=5, k=2n = 5,\ k = 2

15\displaystyle 15

Bell number B(n)

B5=52\displaystyle B_{5} = 52
Show the work
  1. Stirling numbers of the second kind

    S(n,k)S(n, k) counts the ways to split nn different items into kk groups that are not empty and not in any order. The last item either joins one of the kk groups already made from the other n−1n - 1 items, or sits alone as a new group.

    Using S(n,k)=k S(n−1,k)+S(n−1,k−1)S(n, k) = k\,S(n-1, k) + S(n-1, k-1)

    S(5,2)=2 S(4,2)+S(4,1)=2×7+1=15\begin{aligned} S(5,2) &= 2\,S(4,2) + S(4,1) \\ &= 2 \times 7 + 1 \\ &= 15 \end{aligned}
  2. The row for n = 5

    Building the table row by row from S(0,0)=1S(0, 0) = 1 gives every S(5,j)S(5, j).

    S(5,0)=0, S(5,1)=1, S(5,2)=15, S(5,3)=25, S(5,4)=10, S(5,5)=1S(5,0) = 0,\ S(5,1) = 1,\ S(5,2) = 15,\ S(5,3) = 25,\ S(5,4) = 10,\ S(5,5) = 1
  3. Result

    So S(5,2)=15S(5, 2) = 15.

Worked examples