Pascal's Triangle Generator
Generate Pascal's Triangle to any number of rows.
See binomial coefficients, row sums, and patterns in the triangle.
What Is Pascal’s Triangle? Pascal’s Triangle is an arrangement of numbers where each number is the sum of the two numbers directly above it. It was described by Blaise Pascal in 1653 in France, though it was known centuries earlier in China (by Jia Xian around 1050), Persia (by Omar Khayyam around 1100), and India.
Structure Row 0 is just “1”. Row 1 is “1 1”. Each subsequent row starts and ends with 1, with each interior number being the sum of the two numbers above it. Row n has n+1 entries.
Binomial Coefficients The entry at row n, position k equals C(n,k) = n! / (k! * (n-k)!). These are the coefficients in the binomial expansion: (a + b)^n = C(n,0)a^n + C(n,1)a^(n-1)b + … + C(n,n)b^n. For example, (a+b)^3 = 1a^3 + 3a^2b + 3ab^2 + 1b^3, matching row 3: 1, 3, 3, 1.
Hidden Patterns Row sums: Each row sums to 2^n (Row 0 = 1, Row 1 = 2, Row 2 = 4, Row 3 = 8…). Diagonals: The first diagonal is all 1s, the second is natural numbers (1,2,3,4…), the third is triangular numbers (1,3,6,10…), the fourth is tetrahedral numbers (1,4,10,20…). Hockey stick pattern: Any diagonal sequence summed equals the entry below and to the side. Fibonacci numbers appear by summing the shallow diagonals.
Applications Probability: C(n,k) gives the number of ways to choose k items from n. Binomial distribution uses Pascal’s Triangle entries. Algebra: expanding (x+y)^n directly. Combinatorics: counting paths, subsets, and arrangements.