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.

Try

Result

You enteredn=10n = 10

42\displaystyle 42

Number of terms used

4\displaystyle 4
Show the work
  1. Partition numbers

    The partition number p(n)p(n) counts the ways to write n=10n = 10 as a sum of positive whole numbers when the order of the parts does not matter, so 4+14 + 1 and 1+41 + 4 are the same partition.

  2. Euler's pentagonal number recurrence

    The numbers subtracted from nn are the generalised pentagonal numbers 1,2,5,7,12,15,…1, 2, 5, 7, 12, 15, \ldots, and the signs go in pairs, ++  −−  +++ +\; - -\; + +. The recurrence stops once the number subtracted would make the argument negative, starting from p(0)=1p(0) = 1.

    Using p(n)=p(n−1)+p(n−2)−p(n−5)−p(n−7)+p(n−12)+p(n−15)−⋯p(n) = p(n-1) + p(n-2) - p(n-5) - p(n-7) + p(n-12) + p(n-15) - \cdots

    p(10)=p(9)+p(8)−p(5)−p(3)=30+22−7−3=42\begin{aligned} p(10) &= p(9) + p(8) - p(5) - p(3) \\ &= 30 + 22 - 7 - 3 \\ &= 42 \end{aligned}
  3. Result

    So p(10)=42p(10) = 42.

Worked examples