Let n be an odd integer >=5.
1) Find the number of pairs (x,y) of positive integers which satisfy the equation x+2y=n.
2) Find the number of triples (x,y,z) of positive integers which satisfy the equation x+y+2z=n.
1) the answer is (n-1)/2
I put x+2y=n
y = (n-x)/2
the n is odd then n= 2k + 1 and x+2y=n then x = 1
y = (n-1)/2
2) the answer is [(n-1)(n-3)]/4