1

I am trying to count the number of elements in $$ S_{n,k} = \left\{(n_1,\ldots, n_k): \forall i,n_i \in \mathbb Z, n_i \geq 0, \sum_i n_i = n\right\},\\ T_{n,k} = \left\{(n_1,\ldots, n_k): \forall i,n_i \in \mathbb Z, \sum_i |n_i| = n\right\},\\ $$

I have already find out the size of $S_{n,k}$ here. But I find it hard to find a simple expression for $T_{n,k}.$ To express $T_{n,k}$ in terms of $S_{n,k},$ one need to do lots of overcounting and inclusion-exclusion, and apparently it is hard to find a closed form.

Does a nice expression for the size $|T_{n,k}|$ exists?

Ma Joad
  • 7,420
  • Obviously $|T| \leq 2^k |S|$. You have at most $2^k$ cases for each case in $S_{n,k}$. Because you can switch the signs. For example: $(n_1, n_2), (-n_1,n_2), (n_1,-n_2), (-n_1, -n_2)$ are in $T$ for $(|n_1|, |n_2|)$ in $S$. I said at most because you have to deal with zeroes. You can seperate cases with zeros like $(0,n_2)$. It's doable. – Dan Jul 22 '22 at 16:56

1 Answers1

2

In this answer, Christian Blatter proved $$|T_{n,k}|=\sum_{j=0}^{\min(n,k)}\binom nj\binom kj2^j.$$ This cannot be written without a summation, which you can prove using Zeilberger's algorithm and Petkovšek's algorithm.

This formula reveals a symmetry between $k$ and $n$ which is not at all obvious from the definition.

Mike Earnest
  • 75,930