Pascal's Triangle Generator
Work out the first rows of Pascal's triangle from rows. Each entry is the sum of the two above it; row n holds C(n, k), and the page prints the substitution so the result can be checked by hand.
Pascal's Triangle Generator
Work out the first rows of Pascal's triangle from rows. Each entry is the sum of the two above it; row n holds C(n, k), and the page prints the substitution so the result can be checked by hand.
How this page computes
Each entry is the sum of the two above it; row n holds C(n, k)
Row n is the expansion of (a + b)^n. The addition rule on the triangle is the same identity as C(n, k) = C(n−1, k−1) + C(n−1, k).
Every entry is a BigInt printed in full, so the counts do not drift at the row where a double would.
The calculation runs entirely in this browser tab; nothing is uploaded.
Pascal's Triangle Generator computes the first rows of Pascal's triangle. Each entry is the sum of the two above it; row n holds C(n, k). The page prints the rule, the numbers substituted into it and the result, so the arithmetic can be checked by hand.
Row n is the expansion of (a + b)^n. The addition rule on the triangle is the same identity as C(n, k) = C(n−1, k−1) + C(n−1, k). Pressed with rows 10, it answers: 1
How to use Pascal's Triangle Generator
Enter rows 10, then press Run: the page evaluates the first rows of Pascal's triangle and prints every line of the working. Typed input is read exactly as written, and a blank field is refused with its name.
Read the first line as the answer and the lines below it as the substitution. If a value is out of range the page refuses it by field and reason instead of printing a number.
With rows 10, the answer is 1.
The triangle is the binomial coefficients
Row n is the expansion of (a + b)^n. The addition rule on the triangle is the same identity as C(n, k) = C(n−1, k−1) + C(n−1, k).
Every entry is a BigInt printed in full, so the counts do not drift at the row where a double would.
What to Expect
Best for
- Working out the first rows of Pascal's triangle without a spreadsheet
- Checking a figure someone else quoted
- Seeing the formula behind an answer
Not ideal for
- More than 40 rows is refused, because the middle coefficient of row 40 already has 12 digits.
- A quantity the page cannot compute, which it refuses instead of estimating
- Rounding an answer that has an exact form
What this tool keeps
- Each entry is the sum of the two above it; row n holds C(n, k)
- Every input exactly as typed
What may need cleanup
- Nothing: the printed answer is the final output
- A unit conversion, if the inputs were entered in different units
Common errors
- More than 40 rows is refused, because the middle coefficient of row 40 already has 12 digits.
- An empty field is refused with the field's name
Example use cases
- Work out the first rows of Pascal's triangle for one set of inputs
- Check the result against the formula by hand
- See which input the answer is most sensitive to
Sample input
Pascal's Triangle Generator: rows 10
Sample output
1 — 1 1
Who this is for
- Students checking a formula
- Anyone who needs the number and the working
Frequently asked questions
What formula does this page use?
Each entry is the sum of the two above it; row n holds C(n, k). The page prints the substitution as well, so the answer can be checked against the rule.
What does Pascal's Triangle Generator refuse?
More than 40 rows is refused, because the middle coefficient of row 40 already has 12 digits.
What does the default example give?
Rows 10 gives 1. Every line below that restates the same arithmetic.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.