1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Number of positive integer solutions for given equation

  1. May 22, 2016 #1
    1. The problem statement, all variables and given/known data
    Let n be an odd integer ≥ 5. Find the number of triplets (x, y, z) of positive integers which satisfy the equation
    x + y + 2z = n

    2. Relevant equations
    Do not know

    3. The attempt at a solution
    Let n = 2k + 1, k ≥ 2

    x + y + 2z = n
    2z = 2k + 1 - (x + y) ≤ 2k + 1 - 2 (because x + y ≥ 2)
    2z ≤ 2k - 1
    Then stuck

    The answer is (n - 1)(n - 3)/4

  2. jcsd
  3. May 22, 2016 #2


    User Avatar
    Homework Helper

    Sometimes these are easiest to look at with a few examples.
    If n = 5, then (1,2,1) and (2,1,1) are your only choices.
    If n = 7, you have more. For z = 1, you have (1,4,1), (2,3,1),(3,2,1),(4,1,1) and for z=2 you have (1,2,2),(2,1,2).
    What I see is that for any z, of which you are limited in choices, you will have an appropriate number of choices for (x+y)=n-2z.

    So how many options for z?
    For each of those options how many choices for y do you have? Once z and y and defined, you have only one choice for x.
  4. May 24, 2016 #3
    I think I get it. Thanks
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted