I do have n items and would like to get the number of all possible combinations whereby the order can be ignored and repetitions are not allowed.
For example, for n = 3 I expect
x1,
x2,
x3,
x1, x2
x1, x3
x2, x3
x1, x2, x3
so the number should be 7.
I can calculate this number, I think, by summing up the binomial coefficients:
$$\sum_{k=1}^{n} \binom{n}{k}$$.
I can calculate this in Python as follows
from scipy.special import binom
n = 3
sum(binom(n, k) for k in range(n))
which indeed returns 7.
What I am wondering is whether there is an analytical equation for this. The closest I could find is
$$\binom{n + r - 1}{r} = \frac{(n+r-1)!}{r!(n-1)!}$$,
but that allows for repetition.