keisoku

Combination Table (Pascal's Triangle) Calculator

Enter a maximum n and see every nCr value for n from 0 up to that maximum, laid out as a lower-triangular table. It is Pascal's triangle at a glance.

Input

Builds a lower-triangular table of nCr (the number of ways to choose r items from n) for n from 0 up to the maximum you set.

Enter an integer between 0 and 30.

Result

Maximum n

8

Total cells

45

Largest value

70

Combination table (nCr)

Rows are n and columns are r. Each cell is nCr, and cells where r exceeds n are left blank.

n \ rr=0r=1r=2r=3r=4r=5r=6r=7r=8
n=01
n=111
n=2121
n=31331
n=414641
n=515101051
n=61615201561
n=7172135352171
n=818285670562881

Symmetry

Each row is symmetric, so nCr equals nC(n-r)


Built from the previous row using nCr = (n-1)C(r-1) + (n-1)Cr, with the ends nC0 and nCn set to 1.

How it works

  • Each row is built from the previous one using nC0 = nCn = 1 and the recurrence nCr = (n-1)C(r-1) + (n-1)Cr, which is Pascal's triangle.
  • Values are computed with BigInt so large entries stay exact.
  • The maximum n is intended to be between 0 and 30.
  • Each row is symmetric, so nCr equals nC(n-r).

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Combination Table (Pascal's Triangle) Calculator