← Math & statistics

Stirling numbers table (first & second kind)

Explore S(n,k), s(n,k), and c(n,k) in a triangle table. Tap any cell to see its meaning, recurrence, and related identities.

The Bell numbers tab is also available here, so you can jump between partitions and cycle counts without leaving the page.

Other languages 日本語 | English | 简体中文 | Español | Português (Brasil) | Bahasa Indonesia | Français | हिन्दी | العربية

How to use (3 steps)

  1. Select the type (S, s, c, or Bell) and set nMax.
  2. Choose Exact or Mod and enter the modulus if needed.
  3. Tap a cell to read its meaning, then export or share the table.
Type

Definitions & recurrences

Example values

How to use this calculator effectively

This guide helps you use Stirling numbers table (first & second kind) in a repeatable way: define a baseline, change one variable at a time, and interpret outputs with explicit assumptions before you share or act on results.

How it works

The page applies deterministic logic to your inputs and shows rounded output for readability. Treat it as a comparison workflow: run one baseline case, adjust a single parameter, and measure both absolute and percentage deltas. If a result seems off, verify units, time basis, and sign conventions before drawing conclusions. This approach keeps your analysis reproducible across teammates and sessions.

When to use

Use this page when you need a fast estimate, a classroom check, or a practical what-if comparison. It works best for planning and prioritization steps where you need direction and magnitude quickly before investing in deeper modeling, manual spreadsheets, or formal external review.

Common mistakes to avoid

Interpretation and worked example

Run a baseline scenario and keep that result visible. Next, modify one assumption to reflect your realistic alternative and compare direction plus size of change. If the direction matches your domain expectation and the size is plausible, your setup is usually coherent. If not, check hidden defaults, boundary conditions, and interpretation notes before deciding which scenario to adopt.

See also

FAQ

What is the Stirling number of the second kind?

S(n,k) counts the number of ways to partition n labeled elements into k non-empty subsets.

What is the Stirling number of the first kind, and how do signed/unsigned differ?

c(n,k) counts permutations of n elements with k cycles. The signed version s(n,k) applies a sign (-1)^{n-k}.

How are Bell numbers related to Stirling numbers?

Bell numbers satisfy B(n)=Σ S(n,k), so each Bell number is the row sum of the second-kind table.

Why use modulo mode?

Exact values grow quickly; modulo mode keeps numbers small for programming contests and algorithm checks.

Why is there a limit on nMax?

Exact values become huge and large tables are costly to render, so the calculator clamps nMax for stability.

Can I export the table?

Yes. Use the CSV or TSV export buttons to download the full table.

How to use Stirling numbers table (first & second kind) effectively

What this calculator does

This page is for estimating outcomes by changing inputs in one controlled workflow. The model keeps your focus on variables, not output shape. Start with stable assumptions, then test sensitivity by changing one key input at a time to observe directional impact.

Input meaning and unit policy

Each input has an expected unit and a typical range. For reliable interpretation, check whether you are using the same unit system, period, and base assumptions across all runs. Unit mismatch is the most common source of unexpected drift in numeric results.

Use-case sequence

A practical sequence is: first run with defaults, then create a baseline log, then run one alternative scenario, and finally compare only the changed output metric. This sequence reduces cognitive load and prevents false pattern recognition in early experiments.

Common mistakes to avoid

Avoid changing too many variables at once, mixing incompatible data sources, and interpreting a one-time output without checking robustness. A single contradictory input can flip conclusions, so keep each experiment minimal and document assumptions as part of your note.

Interpretation guidance

Review both magnitude and direction. Direction tells you whether a strategy moves outcomes in the desired direction, while magnitude helps you judge practicality. If both agree, you can proceed; if not, rebuild the baseline and verify constraints before deciding.

Related