3

How many solutions are there to $$x+2y+3z=100$$ with $x,y,z\in\Bbb N$?

Can anyone tell me how to do it? I've got no idea how to start.

2 Answers2

2

Hint:

If $z\geq 33$, there is no solution.

If $z=32$, then you can set $y=1$ and you must then set $x=2$.

If $z=31$, you need $x+2y=7$, so you get $y=1$ or $y=2$ or $y=3$.

If $z=30$, you can have $y=1,2,3,4$

If $z=29$, you can have $y=1,2,3,4,5,6$


Can you write a pattern? How many options are there for odd values of $z$? How many for even values of $z$?


Remark:

If you consider $0\in\mathbb N$, the solution changes, but the basic idea remains the same.

5xum
  • 123,496
  • 6
  • 128
  • 204
0

Let's denote the limiting value in your question as $V=100$ and let's assume $x,y,z>0$ (so $ \small 0 \not \in \Bbb N$).

Checking using brute force some smaller $V$, all divisible by $\small 6$, give a polynomially interpolatable sequence of values, producing the interpolating polynomial: $$ P(x)= (2 x^3 -15 x^2+30 x)/72 $$

For values $V$, which are not divisible by $6$ we get a fractional residue , actually $$\small \{P(6k ) \} = 0 \qquad \qquad \{P(6k+1 )\} = 17/72 \qquad \{P(6k+2 ) \} = 16/72 \\ \small \{P(6k+3 ) \} = 9/72 \qquad \{P(6k+4 ) \} = 8/72 \qquad \{P(6k+5 ) \} = 25/72 $$

The function $$ C(x) = \lfloor P(x) \rfloor = \left \lfloor {2 x^3 - 15 x^2+ 30 x\over 72} \right \rfloor $$ gives correct values for all x, for instance $V=100$ we get $C(V)= 25736$ , and for $V=12$ we get $C(V)=23$ (which can be checked by hand).


If we assume $x,y,z \ge 0$ (thus allow $ 0 \in \Bbb N$ ) we get the slightly changed function $$ C_0(x)= \left \lfloor { 2 x^3 + 21 x^2 + 66 x + 72 \over 72} \right \rfloor $$

and get $C_0(100) = 30787$