I am looking for a formula to calculate the number or possible permutations when: a) repetition is not allowed and b) you don't have to pick all elements from the pool.
So I got n elements and I want to know how many combinations I can get when the position matters, I can't pick an element twice and I don't have to use all elements.
Thanks in advance!
If we are going to use $k$ elements, they can be chosen in $\binom{n}{k}$ ways, and lined up in $k!$ ways. That gives a number that simplifies to $\frac{n!}{(n-k)!}$. Add up from $k=0$ to $k=n$, if you will allow the "empty" string, or from $k=1$ to $n$ if you will not. (I like the empty string, it is unassuming.)
For attractiveness reverse the order of summation. We get $$n!\left(1+\frac{1}{1!}+\frac{1}{2!}+\cdots+\frac{1}{n!}\right)$$ if we allow the empty string. Otherwise we stop at the $\frac{1}{(n-1)!}$ term. I do not know of an exact "closed form" for this expression.