Bell Number in LaTeX (B_n)
- LaTeX command
B_n- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Bell number B_n: the total number of ways to partition a set of n elements into nonempty blocks.
Bell numbers begin 1, 1, 2, 5, 15, 52, 203 and equal the sum of Stirling numbers of the second kind, B_n = \sum_k S(n, k). They satisfy B_{n+1} = \sum_k \binom{n}{k} B_k and Dobinski's formula B_n = \frac{1}{e}\sum_{k \geq 0} \frac{k^n}{k!}. A notation clash to watch: B_n also denotes Bernoulli numbers, which appear in Euler-Maclaurin and zeta values, so analysts may need to rename one. Braces are required when the index is an expression, as in B_{n+1}. They are the moments of a Poisson distribution with mean 1.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Bell Number: $B_n$
\[ B_{n+1} = \sum_{k=0}^{n} \binom{n}{k} B_k \]
\end{document}Related symbols
- Cycle
C_n - Stirling Second Kind
\genfrac{\{}{\}}{0pt}{}{n}{k} - Fibonacci
F_n - Stirling First Kind
\genfrac{[}{]}{0pt}{}{n}{k} - Partition
p(n) - Rising Factorial
n^{(k)}
Frequently asked questions
- How do I write Bell Number in LaTeX?
- Type B_n in math mode, for example $B_{n+1} = \sum_{k=0}^{n} \binom{n}{k} B_k$. It works in plain LaTeX without loading any package.
- Which package do I need for B_n?
- None. B_n is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use B_n in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $B_n$ in running text.