Pascal's Triangle Row Calculator Formula

Understand the math behind the pascal's triangle row calculator. Each variable explained with a worked example.

Formulas Used

Binom

binom = n >= k ? factorial(n) / (factorial(k) * factorial(n - k)) : 0

Row Sum

row_sum = pow(2, n)

Central

central = factorial(n) / (factorial(floor(n/2)) * factorial(n - floor(n/2)))

Variables

VariableDescriptionDefault
nRow (n)6
kPosition (k)2

How It Works

Pascal's Triangle

Binomial Coefficient

C(n, k) = n! / (k! × (n-k)!)

This is the entry in row n, position k of Pascal's triangle (both starting from 0).

Properties

  • Each entry equals the sum of the two entries above it
  • Row sums: each row sums to 2^n
  • Symmetry: C(n, k) = C(n, n-k)
  • The entries give the coefficients of (a+b)^n
  • Worked Example

    Find the entry at row 6, position 2 of Pascal's triangle.

    n = 6k = 2
    1. 01C(6, 2) = 6! / (2! × 4!)
    2. 02= 720 / (2 × 24)
    3. 03= 720 / 48
    4. 04= 15
    5. 05Row 6: 1, 6, 15, 20, 15, 6, 1

    Ready to run the numbers?

    Open Pascal's Triangle Row Calculator