1

For example, given $1,2,3$, we have 15 combinations:

$1,2,3,12,13,21,23,31,32,123,132,213,231,312,321$.

I have the formula $\sum\limits_{k=1}^{n}\binom{n}{k}*k!$ which can be simplified to $\sum\limits_{k=1}^{n}\frac{n!}{(n-k)!}$

I am wondering whether or not this formula can be further simplified...?

barak manos
  • 43,109

2 Answers2

6

For $n\ge1$, your sum is equal to $$ \lfloor n!e-1\rfloor $$ This is because $$ \begin{align} \sum_{k=1}^n\frac{n!}{(n-k)!} &=n!\sum_{k=0}^{n-1}\frac1{k!}\\ &=n!\sum_{k=0}^\infty\frac1{k!}-n!\sum_{k=n}^\infty\frac1{k!}\\ &=n!e-1-\frac1{n+1}-\frac1{(n+1)(n+2)}-\dots \end{align} $$ and since $\frac1n=\frac1{n+1}+\frac1{(n+1)^2}+\frac1{(n+1)^3}+\dots\gt\frac1{n+1}+\frac1{(n+1)(n+2)}+\frac1{(n+1)(n+2)(n+3)}+\dots$ $$ n!e-1-\frac1n\lt\sum_{k=1}^n\frac{n!}{(n-k)!}\lt n!e-1-\frac1{n+1} $$


Examples

For $n=2$, this gives $\lfloor5.43656365691809-1\rfloor=4$.
For $n=3$, this gives $\lfloor16.3096909707543-1\rfloor=15$.
For $n=4$, this gives $\lfloor65.2387638830171-1\rfloor=64$.

robjohn
  • 345,667
2

I don't think the sum you wrote corresponds to the number of combinations in lists like the one you wrote out.

I think you're looking for $$\displaystyle\sum\limits_{k=1}^{n+1} \binom{n+1}{k}$$


This is the sum of the elements in the $(n+1)^\text{th}$ row of Pascal's Triangle, minus one. This is equal to $$2^{n+1}-1$$.

For example, when $n=3$, this gives $2^4-1 = 15$.


EDIT: This answer is incorrect (see comments).

  • For $n=3$, your formula yields $3+3+1=7$, and it's not what I'm looking for in any case. Pascal Triangle gives you the number of permutations, where the order of elements is irrelevant. – barak manos Mar 29 '14 at 10:23
  • Thanks for the correction! I edited my answer. I meant row number $n+1$. So for $n=3$, we have $4 + 6 + 4 + 1 = 15$. I think it is what you're looking for :) – Zubin Mukerjee Mar 29 '14 at 10:31
  • Example: For $n=10$, we can use the more convenient formula $2^{n+1} -1$ to get $2047$ as the number of combinations. – Zubin Mukerjee Mar 29 '14 at 10:33
  • 1
    For $n=2$ your this would give $7$, whereas the correct answer is $4$ ($1, 2, 12, 21$)... Even conceptually, you give a formula that doesn't take permutations into account, and the $n+1$ comes from nowhere. It's just a coincidence that it gives the right result for $n=3$. – Najib Idrissi Mar 29 '14 at 10:47
  • Given $1,2,3,4$, I have 64 combinations. Your formula yields 31. So I gave you a vote, but the answer is not correct. – barak manos Mar 29 '14 at 10:47
  • This does not count what the question asks. This counts the number of ways to arrange $n$ objects and one blank. However, there are sometimes more than one blank in the arrangement that is requested in the question. – robjohn Mar 29 '14 at 10:50
  • Yes, this is completely wrong. I edited the answer to say that. Thanks for noting that it was a simple coincidence that it worked for $n=3$ ... not sure what I was thinking. – Zubin Mukerjee Mar 29 '14 at 10:51