1, row 2 is 1 1, etc.Pascal’s Triangle is an infinite triangular array of integers built from a simple rule: every row starts and ends with 1, and each interior value equals the sum of the two values directly above it. Although it is commonly associated with Blaise Pascal (17th century), versions of the triangle appeared much earlier in several mathematical traditions.
The triangle is more than a curiosity: it is a compact “index” of binomial coefficients (combinations), and it also reveals patterns connected to algebra (binomial expansion), probability (binomial distribution), and number theory (divisibility and modular patterns).
If we count rows starting at 0 (top row is row 0), the value in row n and position k (starting at 0) is traditionally written as:
with boundary values:
P(n, 0) = 1 and P(n, n) = 1This generator uses that exact addition rule, building each row from the row before it.
Every entry in Pascal’s Triangle is a binomial coefficient:
Interpretation: (n choose k) counts how many ways to choose k items from n items without order.
When using this page, remember the UI asks for a number of rows starting from the top. If you generate R rows, you are producing rows n = 0 through n = R − 1 in the 0-based binomial-coefficient convention.
1, which corresponds to n = 0.(n choose k) = (n choose n − k).n is 2^n. This matches the fact that an n-element set has 2^n subsets.n, the k-th entry (starting at 0) equals (n choose k).If you enter Rows = 5, the generator outputs 5 rows:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
These correspond to n = 0..4. Now connect this to the binomial theorem. The coefficients in the expansion of (a + b)^4 are:
(a + b)^4 = 1·a^4 + 4·a^3b + 6·a^2b^2 + 4·ab^3 + 1·b^4
Those coefficients (1, 4, 6, 4, 1) match the last generated row above. In general, the coefficients of (a + b)^n are the numbers in row n of Pascal’s Triangle (with the top row as n = 0).
Pascal’s Triangle contains many well-known patterns. Here are a few that are easy to verify with small row counts:
1, 2, 3, 4, … (these are (n choose 1)).1, 3, 6, 10, 15, … (these are (n choose 2)).1, 1, 2, 3, 5, 8, ….| Tool | Best for | Output | Typical question |
|---|---|---|---|
| Pascal’s Triangle generator (this page) | Seeing many coefficients at once and spotting patterns | A whole table of rows | “What are all coefficients for (a+b)^n?” |
| Combination / nCr calculator | Computing one specific coefficient precisely | A single value (n choose k) | “How many ways to choose k from n?” |
| Binomial distribution calculator | Probability questions with repeated trials | Probabilities, CDF/PMF | “What is P(X = k) for n trials?” |
1 (equivalent to n = 0 in (n choose k) notation). Generating R rows produces coefficients up to n = R − 1.Number.MAX_SAFE_INTEGER and require BigInt/other handling.If you want to compute a single coefficient or use these values in probability, you may also like a combinations (nCr) tool and a binomial distribution calculator.