Number of positive integer solutions for given equation

  • Thread starter songoku
  • Start date
  • #1
songoku
2,028
265

Homework Statement


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

Homework Equations


Do not know

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

Thanks
 

Answers and Replies

  • #2
RUber
Homework Helper
1,687
344
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.
 
  • #3
songoku
2,028
265
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.

I think I get it. Thanks
 
  • #4
Prof B
66
37
This is a combinatorics question, not really a pre-calculus question.

Throughout, order matters and duplicates are allowed.

How many ways are there to write n as the sum of k nonnegative integers? Answer: (n+k-1) choose (k-1). Why? Place n 1s and k-1 separators.

How many ways are there to write n as the sum of k positive integers? Answer: (n-1) choose (k-1). Why? Write n-k as the sum of k nonnegative integers and then add 1 to each of them.

Assume that n is even. How many ways are there to write n as the sum of k even positive integers? Answer: (n/2 - 1) choose (k-1). Why? Write n/2 as the sum of k positive integers and then multiply each of them by 2.

Assume that n is odd. How many ways are there to write n as the sum of k positive integers where the last is even and exactly one of the others is odd? (k-1) (((n-1)/2) choose (k-1))
Why? Write n+1 as the sum of k positive even integers and then subtract 1 from one of the first k-1.

To answer your question, let k=3.
 
  • #5
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2021 Award
22,214
13,635
This is a combinatorics question, not really a pre-calculus question.
It's also homework from 6 years ago!
 
  • #6
Prof B
66
37
Correction: Partitions into k positive integers where order matters are actually called k-compositions. I don't know what name is given to partitions into k natural numbers where order matters.
 

Suggested for: Number of positive integer solutions for given equation

Replies
43
Views
807
  • Last Post
Replies
4
Views
1K
Replies
14
Views
2K
Replies
2
Views
593
Replies
6
Views
7K
Replies
4
Views
1K
Replies
5
Views
1K
Top