keisoku

Combination with Repetition Table (nHr)

Enter a maximum n and a maximum r to build a reference table of nHr, the number of ways to choose r items from n types with repetition allowed. Values are computed exactly with BigInt.

Input

Enter a maximum n and a maximum r to list the values of nHr (combinations with repetition) in a table.

Largest n laid out across the top from 0

Largest r laid out down the side from 0

Result

Maximum n

8

Maximum r

8

Cells

81

Combinations with repetition nHr table

Columns are n, rows are r, and each cell is the value of nHr.

r over nn = 0n = 1n = 2n = 3n = 4n = 5n = 6n = 7n = 8
r = 0111111111
r = 1012345678
r = 201361015212836
r = 30141020355684120
r = 4015153570126210330
r = 50162156126252462792
r = 601728842104629241,716
r = 7018361203307921,7163,432
r = 8019451654951,2873,0036,435

Combinations with repetition are nHr = C(n plus r minus 1, r), computed exactly with BigInt.

How it works

  • The number of combinations with repetition nHr counts how many ways you can choose r items from n types when repetition is allowed, and it equals C(n plus r minus 1, r).
  • This table lists n across the top and r down the side, computing nHr for every value from 0 up to each chosen maximum.
  • When r is 0 there is exactly 1 way (choose nothing), and when n is 1 there is exactly 1 way (pick the same item r times).
  • Values are computed exactly with BigInt to avoid overflow, and the number of cells is capped so the table stays readable.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Combination with Repetition Table (nHr)