I was reading through some stuff about cellular automaton and faced the following problem. Basically, I have three squares, each can contain one number among 1,2 and 3, and I have to consider all possible combinations of such 3 numbers such that they have different mean value.
Doing this by counting is trivial, but was wondering whether this can be put in a more formal way in order to compute the same for more numbers involved. One way is to consider all possible combinations with repetitions, which for the specific case are
\begin{equation} \begin{pmatrix} n+k-1 \\ k \end{pmatrix} = \begin{pmatrix} 3 \\ 3 \end{pmatrix} =10 \end{equation}
and then ignore all combinations with the same mean value, as (112) and (022).
Is there a way to put this in Diofantine equations? I'm quite ignorant on the topic, but the combinations above can be calculated as all the possible solutions of the equation
\begin{equation} x_1 + x_2 + x_3 = 3 \end{equation}
with $x_i$ the number of times the number $i$ is found in the combination. At this point I'm stuck and cannot continue on imposing the different mean value condition.
In the general case where you have $n$ squares containing a number from $1$ to $k$, the number of possible combinations with different mean values is simply the number of possible mean values. The smallest mean is $1$, the largest is $k$, and any exact multiple of $1/n$ between these values is possible. That gives $nk-n+1$ options.