Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Permutations with Repetition (n = 17)
nΠr = nr
table for r = 0 to 20, shown to 18 significant digits
r nΠr = nr
0 1
1 17
2 289
3 4913
4 83521
5 1419857
6 24137569
7 410338673
8 6975757441
9 118587876497
10 2015993900449
11 34271896307633
12 582622237229761
13 9904578032905937
14 168377826559400929
15 2.86242305150981579E+18
16 4.86611918756668685E+19
17 8.27240261886336764E+20
18 1.40630844520677250E+22
19 2.39072435685151325E+23
20 4.06423140664757252E+24

What is permutations with repetition?

Permutations with repetition (also called permutations with replacement) count the number of ordered arrangements of r items chosen from a set of n distinct items when each item may be reused as many times as you like. Because each of the r positions can independently be filled by any of the n items, the total count is n times itself r times, written as \({}_{\text{n}}\Pi_{r} = \text{n}^{\,r}\). This is distinct from ordinary permutations \({}_{n}P_{r} = \frac{n!}{(n-r)!}\), which forbid repetition.

Tree diagram showing 2 slots each filled from a set of 3 symbols, giving 9 ordered outcomes
Each of r positions is independently chosen from all n options, so repetition is allowed.

How to use this calculator

Enter the number of distinct items n, then choose the starting value of r and the ending value of r. The tool builds one row for every integer r in that inclusive range and prints \(\text{n}^{r}\) for each. Because these numbers grow extremely fast, the calculator uses exact big-integer arithmetic internally and lets you choose how many significant digits to display (default 18). If you enter a start value larger than the end value, they are swapped so the table still reads in ascending order.

The formula explained

The core rule is $$ {}_{\text{n}}\Pi_{r} = \text{n}^{\,r}. $$ Each of the r positions is an independent choice among n options, so by the multiplication principle the arrangements multiply: \(\text{n} \times \text{n} \times \dots \times \text{n}\) (r factors). Special cases follow directly: when \(r = 0\) there is exactly one arrangement (the empty arrangement), so \(\text{n}^{0} = 1\) for any n, including the convention \(0^{0} = 1\) used here. When \(\text{n} = 0\) and \(r > 0\), there are no items to place, so the count is 0.

Advertisement
Formula n to the power r illustrated as r identical boxes each with n choices multiplied together
The formula \({}_{\text{n}}\Pi_{r} = \text{n}^{r}\): multiply n choices once for each of the r positions.

Worked example

With \(\text{n} = 17\) and r ranging from 0 to 20, the table starts 1, 17, 289, 4,913, 83,521, ... and ends at \(r = 20\) with $$ 17^{20} = 4{,}064{,}231{,}406{,}647{,}572{,}522{,}401{,}601, $$ which is about \(4.06 \times 10^{24}\). A smaller sanity check: with \(\text{n} = 2\) and r from 0 to 4 you get 1, 2, 4, 8, 16, exactly the count of binary strings of each length.

FAQ

Why is \(\text{n}^{0} = 1\)? There is exactly one way to arrange zero items: choose nothing. This empty arrangement makes the formula consistent.

How is this different from \({}_{n}P_{r}\)? Ordinary permutations \({}_{n}P_{r}\) do not allow reuse, giving \(\frac{n!}{(n-r)!}\). Here repetition is allowed, so every position has all n choices and the answer is \(\text{n}^{r}\).

Why are big numbers shown rounded? The internal math is exact, but very large results are displayed to a chosen number of significant digits for readability.

Last updated: