Stirling First Kind in LaTeX (\genfrac{[}{]}{0pt}{}{n}{k})
- LaTeX command
\genfrac{[}{]}{0pt}{}{n}{k}- Package
- Add to your preamble:
\usepackage{amsmath} - Mode
- Math mode only
Try Stirling First Kind in a real LaTeX document
Open a ready-to-compile document that already uses \genfrac{[}{]}{0pt}{}{n}{k}, with the right packages loaded. Edit it and see the PDF, no install needed.
Where it is used
Unsigned Stirling number of the first kind: permutations of n elements with exactly k cycles, in bracket notation.
\genfrac takes six arguments: left delimiter, right delimiter, rule thickness, style, numerator, denominator. Setting the thickness to 0pt removes the fraction bar, giving the stacked bracket notation from Concrete Mathematics. These numbers satisfy the recurrence {n+1 \brack k} = n {n \brack k} + {n \brack k-1} and sum over k to n!. Rather than repeating the six-argument call, define a macro such as \newcommand{\stirlingI}[2]{\genfrac{[}{]}{0pt}{}{#1}{#2}}. The empty fourth argument lets size follow context; use 0 for display or 1 for text style.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Stirling First Kind: $\genfrac{[}{]}{0pt}{}{n}{k}$
\[ \genfrac{[}{]}{0pt}{}{4}{2} = 11, \quad \sum_k \genfrac{[}{]}{0pt}{}{n}{k} = n! \]
\end{document}Related symbols
- Stirling Second Kind
\genfrac{\{}{\}}{0pt}{}{n}{k} - Rising Factorial
n^{(k)} - Bell Number
B_n - Falling Factorial
(n)_k - Cycle
C_n - Multinomial
\binom{n}{k_1, k_2, \ldots, k_m}
Frequently asked questions
- How do I write Stirling First Kind in LaTeX?
- Type \genfrac{[}{]}{0pt}{}{n}{k} in math mode, for example $\genfrac{[}{]}{0pt}{}{4}{2} = 11, \quad \sum_k \genfrac{[}{]}{0pt}{}{n}{k} = n!$. Load amsmath first with \usepackage{amsmath}.
- Which package do I need for \genfrac{[}{]}{0pt}{}{n}{k}?
- \genfrac{[}{]}{0pt}{}{n}{k} needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
- Can I use \genfrac{[}{]}{0pt}{}{n}{k} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\genfrac{[}{]}{0pt}{}{n}{k}$ in running text.
Editor LaTeX AI Terbaik, Alternatif Overleaf
Octree membantu peneliti dari 15+ universitas menulis makalah penelitian lebih cepat menggunakan AI
- Hasilkan diagram TikZ yang indah menggunakan AI
- Unggah gambar dan konversi ke LaTeX dengan mulus
- Dapatkan bantuan instan untuk menulis dan memformat makalah penelitian