Can a known sum and average determine a set of natural numbers? Say we are given a predetermined sum and average of $n$ distinct natural numbers ranging from $0-50.$ Knowing the sum and average of any such set of natural numbers, is it be possible to determine what that set is? If so, would the solution be unique?
E.g., Let's say $n=5.$  It looks like the solution is not unique, but is there any way to functionally determine the set, or is it just guess and check?
 A: No. First notice that the two numbers you are given are not independent from one another. If $x_1 + ... + x_n = \alpha$ then the average is $ \frac{x_1+ ... +x_n}{n} = \frac{\alpha}{n}$ so you only have the information 
$$x_1 + ... + x_n = \alpha \qquad 0<\alpha<50, \; \alpha\geq x_i \geq 0.$$
An equation which as $\binom{\alpha + (n-1)}{n-1}$ different solutions.  
A: If we have $n$ distinct numbers in $\{a,a+1,...,b-1,b\}$ then $n\geq a+(a+1)+...+(a+n-1)=an+n(n-1)/2$ and $n\leq b+(b-1)+...+(b-n+1)=bn-n(n-1)/2$. We find that a set can be found if, and only if, $an+n(n-1)/2\leq n\leq bn+n(n-1)/2$. The set will be unique if one of the inequalities is an equality, or off-by-one, or if $n=1$.
A: No. To start, if you know the sum and the amount of digits then the average doesn’t give you any more information since the average is the sum over the amount of digits (given that they are all distinct). So you could imagine different sets of $ n $ numbers that add up to a given number $ S $. Ex.:
10=1+2+7=1+4+5.
A: For a set of $n$ numbers, you have $n$ "degrees of freedom".
Generally speaking, each condition you impose loses a degree of freedom. 
Naively, you would assume $(n-2)$ degrees of freedom after imposing two conditions on $n$ variables.
However, the sum $S$ and mean $M$ are closely related: $S=nM$.
For example, say you have three numbers with sum 30 and mean 10. Then you need $x_1+x_2+x_3=30$ and $\frac{1}{3}(x_1+x_2+x_3)=10$. But this last condition is equivalent to $x_1+x_2+x_3=30$.
Say you have three numbers with the sum 30 and the mean 5. Then you need $x_1+x_2+x_3=30$ and $\frac{1}{3}(x_1+x_2+x_3)=5$. This last condition is equivalent to $x_1+x_2+x_3=15$, and so you need $15=30$ which is impossible; there are no such numbers.
In short, if the sum and mean are compatible, i.e. $S=nM$, then you have one, and only one, condition:
$$x_1+\cdots+x_n=S$$ 
You need to know the number of partitions of $S$.
