# Difference in total number of positive integers $x, y, z$ determined from an equation.

Find all positive integers $x, y, z$,such that $$x+2y+3z=12$$

Using the formula (got in almost similar thread) I got ${k−1 \choose n−1}=55$ solutions are available from the equation where $k=12$ and $n=3$

After reading some similar examples from similar threads I tried to solve it using $\text{Trial and error }$ method-

$12=1.2.2.3$ $$\frac{x+2y+3z}{12}=m$$ $$\therefore 1+2.1+3.3=12 \\1+2.4+3.1=12\\ 2+2.2+2.3=12 \\ 3+2.3+3.1=12 \\ 4+2.1+3.2=12 \\ 5+2.2+3.1=12 \\ 7+2.1+3.1=12$$.

So, out of $55$ solutions I can figure out only 7 solutions.

What is the reason for this difference? If I am wrong anywhere please guide me to a right way. Any help is appreciated.

• where comes from the formula? Mar 8, 2018 at 21:30
• There are only $7$ solutions. Where does that $\binom{k-1}{n-1}$ come from? Mar 8, 2018 at 21:30
• How is this question related to prime-numbers ? Mar 8, 2018 at 22:39
• @Peter It was given in an exam with a question related to prime number.
– vbm
Mar 9, 2018 at 6:17
• @Rócherz, I got this formula from a thread, where there was more restricted conditions and there this was applied
– vbm
Mar 9, 2018 at 6:22

Maybe you can get to fifty-five solutions if you ditch the restriction that $x, y, z$ have to be positive:
$$\ldots \\ 8 + 2 \times 2 + 3 \times 0 = 12 \\ 0 + 2 \times 0 + 3 \times 4 = 12 \\ 0 + 2 \times 3 + 3 \times 2 = 12 \\ 0 + 2 \times (-3) + 3 \times 6 = 12 \\ -1 + 2 \times 5 + 3 \times 1 = 12 \\ \ldots$$
Oops... it turns out that removing the stricture enables infinitely many solutions. For instance, if you fix $x = -1$, then $y = 5 - 3n$ and $z = 2n + 1$ for all $n \in \mathbb{Z}$ are solutions.
There are only seven solutions satisfying the requirement that $x, y, z$ have to be positive, and you've found them all. If $7 < x < 12$, then you probably need $y$ or $z$ equal to $0$, and for $x = 12$ then certainly $y = z = 0$. For all $x > 12$, you probably need one of $y$ or $z$, most likely both, to be negative.