1

How many pairs of $(x,y,z)$ for $x+y+2z=n$ when $n$ is an odd integer $\geq 5$

For $n=5$ there are 2 pairs. $n=7$ there are 6 pairs. $n=9$ there are 12 pairs. $n=11$ there are 20 pairs.

$an^2 + bn + c = f(n)$

$25a + 5b + c = 2$

$49a + 7b + c = 6$

$81a + 8b + c = 12$

$f(n) = (n^2)/4 - n + 3/4 = (n-3)(n-1)/4$

Is there a better way to solve it?

Dini
  • 1,391

2 Answers2

2

put z=2 then x+y=n-2 has n-3 ways (x can be anything from 1 to n-3).

then put z=4 then x+y=n-4 has n-5 ways (x can be anything from 1 to n-5).

.

.

.

.

put z =n-3 then x+y =3 have 2 ways.

total number of cases = 2+4+ 6.......n-3 = 2(1+2+3....$\frac{n-3}{2}$) = 2 $\frac{(\frac{n-3}{2})(\frac{n-1}{2})}{2}$ = $\frac{(n-3)(n-1)}{4}$


aryan bansal
  • 1,923
1

For $x,y,z\in \mathbb{N}, x,y,z\geq 0$,

When $n$ is odd, the number is: $$ (n+1)+(n-1)+(n-3)+...+2=\frac{(n+1)(n+3)}{4} $$

when $n$ is even, the number is: $$ (n+1)+(n-1)+(n-3)+...+1=(\frac{n+2}{2})^2 $$

Jo Jomax
  • 597