# How many non-negative integer solutions are there to x+y +z = 30 such that each of x, y, z is divisible by 3

How many non-negative integer solutions are there to x+y+z = 30 such that each of x, y, z is divisible by 3?

It is simple if it does not have to satisfy the divisible by 3 condition. However with that condition in place, I can't seem to figure out how to solve this. Please help, Thanks!

• How many non-negative integer solutions are there to $x+y+z=10$? – Lord Shark the Unknown Jul 10 '17 at 3:46
• Yes. That's better. Forgot that we can transform variables too. – Dhruv Kohli - expiTTp1z0 Jul 10 '17 at 3:48
• @Lord Shark the Unknown thank you! – Kevin Jul 10 '17 at 4:22

If $x$, $y$, and $z$ are all divisible by 3, then $\frac{x}{3}$, $\frac{y}{3}$, and $\frac{z}{3}$ are all non-negative integers and $\frac{x}{3} + \frac{y}{3} + \frac{z}{3}=10$.