# Newton Binomial for number of integer solutions to $|x|+|y|+|z|=30$

Following my post here: Newton Binomial to find $(x_1+x_2+x_3)(x_4+x_5+x_6+x_7)=77$

I would like to know the number of integer solutions to |x|+|y|+|z| = 30. Without the absolute value I get 32 choose 30 (496). With the absolutes, I get 3602 (by computer simulation) and I don't know why...

• Title: "Neuton" should be "Newton". Mar 23 at 15:13

The formula for the number of positive solutions to the equation $$x_1+x_2+\dots+x_k=n$$ reads $$\binom {n-1}{k-1}.$$ Therefore the number your are looking for is: $$2^3\binom{29}2+\binom312^2\binom{29}1+\binom322^1\binom{29}0=3602,$$ where the terms count contributions with the number of zeros in the set $$\{a,b,c\}$$ being $$0,1$$ and $$2$$, respectively.

Hint Consider the equation $$a+b+c=30$$ with $$0 \leq a,b,c$$.

For each solution with $$a,b,c \geq 1$$ you get $$8$$ solutions $$x= \pm a, y= \pm b, z=\pm c$$ to your equation.

For each solution with exactly one of $$a,b,c$$ equals zero you get $$4$$ solutions to your equation.

For each solution with exactly one of $$a,b,c$$ equals zero you get $$2$$ solutions to your equation.

• Thanks allot for your answer! Unfortunately I still can't figure out how to incorporate your hint :-( Can you elaborate? Thanks Mar 23 at 15:38
• avi, after this you can use generating functions or stars and bars Mar 23 at 16:32
• @AviTal If $a,b,c \geq 1$ then set $a'=a-1,b'=b-1,c'=c-1$ and use stars and bars. If $a=0$ and $b,c >1$ you need to solve $b+c=30$ with $b \geq 1, c \geq 1$. AGain, set $b'=b-1, c'=c-2$ and solve via stars and bars.. Mar 23 at 20:12