I wonder if anyone could point me to a reference about the following type of combinatorics problem:
Fix $n $. For an integer $k \in [n] = \{1, \ldots, n\}$, let $A(k)$ be the set of integers in $[0, 2^n-1]$ that have Hamming weight $k$ in their binary representation. Fix $w \in [n]$ and let $m_1 < \cdots < m_k \in [n] \setminus \{w\}$ be distinct integers.
Question: What is the number of integers $x \in A(w)$ that belong to $A(m_1) + \cdots + A(m_k)$, where addition is taken modulo $2^n$. That is, how many integers in $[0, 2^n-1]$ of Hamming weight $w$ can be written as the sum of $k$ integers of Hamming weight $m_1, \ldots, m_k$, respectively, where addition is the regular addition modulo $2^n$ (commonly used by computers).
Seems like a convoluted not that easy problem because of carry of digits in addition. Nevertheless I have a feeling one should be able to count and have a formula. References or comments are very welcome. Thanks!