# How to determine the amount of possible combinations?

I'm familiar with the concepts of permutations and combinations, however I can't seem to find a formula for the unique combinations of a repeating series. For example if I wanted to find the unique combinations of 3 different digits (from 1-3), that may repeat, how would I do that. Obviously I could go through the process of writing out all the unique combinations,

111 112 113 122 123 133 223 332 222 333

But what If I had to do this for 100 digits? Is there a formula for this. Thanks!

• 100 digits and all the digits are 1-3?
– Remy
Nov 30 '17 at 4:47
• Just for clarity, you are considering 1,3,3 and 3,3,1 to be the same?
– Remy
Nov 30 '17 at 4:51
• @Remy yes, this is assuming that 1,3,3 and 3,3,1 are the same
– John
Dec 2 '17 at 3:30

I think you are considering 133 and 331 to be the same.

Let the number of 1's, 2's and 3's be positive integers $a,b,c,$ such that $a+b+c= 100$,

then number of ways $=\dfrac{\binom{100}{a,b,c}}{a!b!c!}$

If the $100$ "cells" are considered to be distinct, then simply $\binom{100}{a,b,c}$

Far a number n digits long using n digits:

$$\sum_{k=2}^{n-1} \sum_{s=0}^{n-1} k^s + n$$

Althouh this is hard to compute but there should be an easier way. If it's a number 100 digits long with 3 digits then it's already been answered.

When I'm not on my phone I'll see if there's an easier formula

• I am also considering the unique amount of each digit for each combination like true blue anil did Nov 30 '17 at 15:05
• Just realized a mistake so nevermind this for now Nov 30 '17 at 15:53