I'm trying to find a analytical way for finding the total amount of unique solutions to equation:
$$\sum\limits_{i=1}^n a_i = A, \text{when } l \leq a \leq u,$$ where $a,A,l,u \in \mathbb{N}$. For example:
$$\sum\limits_{i=1}^2 a_i = 4, \text{when } 1 \leq a \leq 3,$$ has solution three unique solutions $(2,2), (1,3), (3,1)$. I haven't found a strategy for this type of problem in any literature, but it seems to be a type of problem that interest mathematicians.