Arrangements with Repetition

N=nrN = n^{r}

Worked example: Four-digit PIN → 10000 codes — press Try an example to run it live, then adjust anything.

Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Try different units for next level excitement!

Learning zone

Arrangements with Repetition explained

rnN

When each position is filled independently from the same n options and repeats are allowed, the count is n multiplied by itself r times. A four-digit PIN gives 10⁴ = 10,000 possibilities; an eight-character password from 95 printable ASCII characters gives 95⁸ ≈ 6.6 × 10¹⁵. Solved for r, the formula answers the security question directly: to exceed a billion possibilities with a 26-letter alphabet you need r = ln(10⁹)/ln 26 ≈ 6.4, so seven letters.

Exponentials of this kind are why the Enigma machine was formidable — its plugboard and rotor settings ran to about 1.6 × 10²⁰ configurations — and why Bletchley Park had to attack structure rather than count. The trap is applying nrn^r when repeats are forbidden: three distinct digits give 10 × 9 × 8 = 720 codes, not 1000. Also keep the roles straight — for a 4-digit PIN it is 10⁴ = 10,000, not 4¹⁰ = 1,048,576.

Arrangements with Repetition formula

N=nrN = n^{r}
Where
  • NN= Number of possible sequences
  • nn= Choices per position
  • rr= Number of positions

Missing one of these? Work it out first, then come back