Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How many ordered quadruples $(x_1,x_2,x_3,x_4)$ that are elements of the $\Bbb Z^4$ are there such that $|x_1|+|x_2|+|x_3|+|x_4|= 50$?

share|cite|improve this question

This is the coefficient of $t^{50}$ in the expansion of $$\biggl(\sum_{-\infty}^{\infty}t^{|n|}\biggr)^4=\bigl(1+2\sum_1^{\infty}t^n\bigr)^4$$ Now $$1+2\sum_1^{\infty}t^n=1+{2t\over1-t}={1+t\over1-t}$$ so $$\bigl(1+2\sum_1^{\infty}t^n\bigr)^4=(1+t)^4(1-t)^{-4}=(1+4t+6t^2+4t^3+t^4)\left({3\choose3}+{4\choose3}t+{5\choose3}t^2+\cdots\right)$$ and the coefficient of $t^{50}$ is $${53\choose3}+4{52\choose3}+6{51\choose3}+4{50\choose3}+{49\choose3}=333600$$

share|cite|improve this answer

If all of the $x_i$ are nonzero, then the count is $2^4$ times the number of solutions in positive integers to $x_1+x_2+x_3+x_4=50$. The latter number is $C(49,3)=18424$, and the $2^4$ factor is from choosing signs on the four $x_i$. This gives $2^4*C(49,3)=294784$ for this case.

Now if three of the $x_i$ are to be nonzero, there are 4 ways to choose which are nonzero, and then multiply by $2^3 C(49,2)$. This gives $4 \cdot 2^3 C(49,2)=37632$ for this case.

And if two of the $x_i$ are to be nonzero, there are 6 ways to choose which are nonzero, and then multiply by $2^2*C(49,1)$. This gives $6 \cdot 2^2 C(49,1)=1176$ for this case.

Finally if only one of the $x_i$ is nonzero, there are 4 ways to choose which is nonzero, and two ways to pick the sign (here $|x_i|=50$ of course). So 8 for this case.

Then we add $294784+37632+1176+8=333600$ for the total number asked in the question.

EDIT: the number of solutions to $$|x_1|+...+|x_k|=n$$ may be found using the above method, and gives $$\sum_{j=1}^k 2^j C(k,j) C(n-1,j-1),$$ where $C(m,t)$ denotes the binomial $m$ choose $t$. Maple could not find this sum in closed form.

share|cite|improve this answer
Do you say positive integers and not just integers because the value of the x's will definitely be positive since we are looking for the absolute value? More to the point do we not have to count the possibilities for if the value of x is negative? – Jack Forest Dec 5 '12 at 19:48
Also for the part where you get $2^4*C(49,3)=294784$ , when I calculate $C(49,3)$ I do get 18424 but when I do $2^4*C(49,3)$ I get 147392 am I making a mistake? – Jack Forest Dec 5 '12 at 19:52
$2^4\cdot 18424=294784$. You seem to have calculated instead the value of $2^3 \cdot 18424=147392$. – coffeemath Dec 6 '12 at 0:24
Jack: there is a need to consider the cases of whether the $x_i$ are zero or not, because $-0=+0$ which means the factor of 2 to account for signs $+,-$ doesn't work for the value $0$. That's the whole reason for breaking the count into the cases as I did it here. – coffeemath Dec 6 '12 at 0:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.