# How many quadruples are there?

How many quadruples are there $(x_1,x_2,x_3,x_4) \in \mathbb{Z}^{+}_{0}$ such that $(x_1+x_2)(2x_2+2x_3+x_4)=95$?

My attempt.

We have that $x_1+x_2 = 19$ and $2x_2+2x_3+x_4 = 5$ or $x_1+x_2 = 5$ and $2x_2+2x_3+x_4 = 19$. In the first case, we have $(x_1,x_2): (19,0),(18,1),(17,2)$ and then we check each case correspondingly: $(19,0): 2x_3+x_4 = 5$ there are $3$ solutions here; $(18,1): 2x_3+x_4 = 3$ there are $2$ solutions here; $(17,2): 2x_3+x_4 = 1$ there is $1$ solution here. So there are a total of $6$ solutions here. For the second case, $x_1+x_2 = 5$ and $2x_2+2x_3+x_4 = 19$, we have that $(x_1,x_2): (0,5),(1,4),(2,3),(3,2),(4,1),(5,0).$ Checking each case similarly, $(x_1,x_2): (0,5): 2x_3+x_4 = 9$ there are $5$ solutions here . Similarly we will get $6,7,8,9,10$ solutions. Thus, we have $51$ solutions so far.

Also, there are $2$ more cases: $x_1+x_2 = 1$ and $2x_2+2x_3+x_4 = 95$ or $x_1+x_2 = 95$ and $2x_2+2x_3+x_4 = 1$. In the first case, $(x_1,x_2): (0,1),(1,0)$. We then have $(0,1): 2x_3+x_4 = 93$ and there are $47$ solutions here and $(1,0): 2x_3+x_4 = 95$ and there are $48$ solutions here. Finally for the case of $x_1+x_2 = 95$ and $2x_2+2x_3+x_4 = 1$, we have that $(x_1,x_2):(95,0)$ and thus $2x_3+x_4 = 1$ and thus there is $1$ solution here. So in total, the answer is $51+47+48+1=\boxed{147}$ solutions.

• You are correct. I would have split your first paragraph into two parts, making it $6+45+47+48+1=147$ – tomi Nov 23 '15 at 10:04