henpen
- 50
- 0
Question:
Given a non-negative integer N, show many sets of non-negative integers (a,b,c,d) satisfy 2a+b+c+d=N
Proposed (and roadblocked) solution:
Case 1: 2a=0
Then there are \binom{N+2}{2} solutions (easy to prove).
Case 2: 2a=2
Then there are \binom{N+2-2}{2} solutions.
Case 3: 2a=4
Then there are \binom{N+2-4}{2} solutions.
...
Thus the answer should be \large \sum_{i=0}^{i=1+ \left \lfloor \frac{N}{2} \right \rfloor}\binom{N+2-2i}{2}
The answer I'm looking for is actually 2^{N+1}-1, and numerically my method doesn't check. Where have I gone wrong? I'm fairly confident my analysis for each case 1 was correct.
Given a non-negative integer N, show many sets of non-negative integers (a,b,c,d) satisfy 2a+b+c+d=N
Proposed (and roadblocked) solution:
Case 1: 2a=0
Then there are \binom{N+2}{2} solutions (easy to prove).
Case 2: 2a=2
Then there are \binom{N+2-2}{2} solutions.
Case 3: 2a=4
Then there are \binom{N+2-4}{2} solutions.
...
Thus the answer should be \large \sum_{i=0}^{i=1+ \left \lfloor \frac{N}{2} \right \rfloor}\binom{N+2-2i}{2}
The answer I'm looking for is actually 2^{N+1}-1, and numerically my method doesn't check. Where have I gone wrong? I'm fairly confident my analysis for each case 1 was correct.