n = ± 1 ± 2 ± 3 ± … ± 9 9 ± 1 0 0
How many distinct integers n can be written in this form if we may choose either the plus or the minus sign for each term?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This reminds me of my question ... :D Well done sir!Nice and elegant solution.
I confess that I guessed that the converse was true without proving it ... this is a fantastic proof! Nice work!
I am seeing the ± before the integer m as on-off switches. When the m t h switch is switched from − (off) to + (on), n increases by 2 m . Since the sums of elements in the series { 1 , 2 , 3 , . . . 1 0 0 } can represent all integers k from 1 to 5 0 5 0 . We can switch n from the minimum − 5 0 5 0 , when all 1 0 0 switches are off to the maximum of + 5 0 5 0 when all switches are on ( − 5 0 5 0 + 2 × 5 0 5 0 = + 5 0 5 0 ). As the steps are even, n are all the even integers within ± 5 0 5 0 , which are 5 0 5 1 in total.
I think it is helpful to state (for this and similar problems) that we can add any number to n and the number of different combinations doesn't change. That is to say, there are as many values for n as values for m:
m = 1 ± 1 ± 2 ± 3 ± . . . ± 1 0 0
This converts to
m = ( 0 or 2 ) ± 2 ± 3 ± . . . ± 1 0 0 ,
and we can repeat it with every term:
( 0 or 2 ) + ( 0 or 4 ) + ( 0 or 6 ) + . . . + ( 0 or 2 0 0 )
Hence, (noticing that dividing every term by two doesn't affect the answer) the problem is equivalent to asking, how many distinct integers can be written in the following way?
( 0 or 1 ) + ( 0 or 2 ) + ( 0 or 3 ) + . . . + ( 0 or 1 0 0 )
With this representation, a variation of Otto's solution leads to say that every number from 0 to 5050 can be represented in this way.
So the answer is 2 1 0 0 ⋅ 1 0 1 + 1 = 5 0 5 1
Interesting approach... thanks! (+1) I think a proof is still required that any positive integer up to 5050 can be represented as such a sum.
Here's a proof by induction: We proceed in groups of 4 terms. First note that ± 1 ± 2 ± 3 ± 4 ⋯ ± 7 ± 8 can achieve every even number between − 3 6 and 3 6 .
Now, suppose ± 1 ± 2 ⋯ ± 4 k achieves every even number between ± 2 k ( 4 k + 1 ) . We want to show that including ± ( 4 k + 1 ) ± ( 4 k + 2 ) ± ( 4 k + 3 ) ± ( 4 k + 4 ) will allow us to achieve every even number between ± ( 2 k ( 4 k + 1 ) + 1 6 k + 1 0 ) .
Now, since ( 4 k + 1 ) − ( 4 k + 2 ) − ( 4 k + 3 ) + ( 4 k + 4 ) = 0 , every number achievable before is still achievable. To achieve an even number N between 2 k ( 4 k + 1 ) and 2 k ( 4 k + 1 ) + 1 6 k + 1 0 , set the first 4 k numbers to achieve N − 1 6 k − 1 0 . This is possible, snce, for k ≥ 2 , we have N − 1 6 k − 1 0 > 2 k ( 4 k + 1 ) − 1 6 k − 1 0 = 8 k 2 − 1 4 k − 1 0 > − 2 k ( 4 k + 1 ) . Therefore, we can then simply add each of the new numbers to get ( N − 1 6 k − 1 0 ) + ( 1 6 k + 1 0 ) = N . The negative versions are the same, so the claim holds inductively.
Yes, this works (but you still have to check the case k = 1 , when you include the numbers 5 , 6 , 7 , 8 )
The minimum number obtained with all negative signs is -5050. With changing sign of smallest number, sum changes by 2. Similarly, we observe that only even numbers can be obtained from changing signs of numbers alternatively. Therefore total negative numbers obtained = 5050/2 = 2525. Similarly total positive numbers obtained = 2525. We also obtain 0 as one of the sums. Hence total integers = 5051
Let S = 1 + 2 + 3 + . . . . + 1 0 0
Now, if we replace any one of the p l u s sign, before any number 1 ≤ x ≤ 1 0 0 , then the value of S reduces by 2 x . Also the minimum value of n is − 5 0 5 0 and maximum value of n is 5 0 5 0 . So, every even number between − 5 0 5 0 and 5 0 5 0 inclusive can be obtained. There are 5 0 5 1 even numbers within the limit. Hence , the answer is 5 0 5 1 .
Your answer is correct, but you have not really convinced us that we can write every even number between − 5 0 5 0 and 5 0 5 0 this way. For example, how would you write the number 1 2 3 4 his way, or convince us that it can be done?
Log in to reply
Consider: q = ± 1 ± 2 ± 3
Convince yourself that q can take all even values between − 6 and 6 both inclusive. Also, q cannot be odd since we have an even number of odd terms in the expression.
Mathematical induction for the win.
Log in to reply
I'm still not convinced... I'm a sceptic by nature ;) Can you show us the induction step?
Log in to reply
@Otto Bretscher – That is a bit lengthy. ;) And I understand the skeptic by nature part. Will try to do it when I have time.
@Otto Bretscher – Ok, I think I got it. We will start with the case of 5050. In this case, if we select one number k and make it negative, the sum decreases by 2 k . Hence, we can now form all even numbers from 5050 to 4850 by making different numbers negative.
What is we make two numbers negative? Namely 1 0 0 and another number k ? Now our sum becomes 4 8 5 0 − 2 k since k can vary between 1 and 9 9 , we can now form all even numbers between 5 0 5 0 and ( 5 0 5 0 − 2 ∗ 1 0 0 − 2 ∗ 9 9 ) .
If we make three numbers negative, we can form all even numbers from 5 0 5 0 to ( 5 0 5 0 − 2 ∗ 1 0 0 − 2 ∗ 9 9 − 2 ∗ 9 8 ) . And so on and so forth. The extreme case is when we take every number to be negative and we end up with − 5 0 5 0 .
My bad. I just assumed that all numbers will be obtained.
Started with computing actually with some technique, it is found that the question becomes finding the total number of terms of an arithmetic progression:
-5050, -5048, - 5046, ..., -3, -1, 1, 3, ..., 5046, 5048, 5050
It is all possible outcomes of n. Tn = 5050 = -5050 + (n - 1) 2 => n = 5051.
-5050 to 5050 is the maximum span of the sum n. Smallest variation is a change between -1 and + 1, next to it is a change between -2 and 2, and finally a change between -5050 and 5050 where every sign change between -1 to -100 and 1 to 100 happened simultaneously. Note that such changes are 2, 4, ..., 10100 and every consequence for a presumed conventional initial of -5050 to turn into any even step addition of A.P. is possible. Therefore we obtained the sequence introduced.
Technique of computing actually arranged 1 to 50 forward and turning back from 51 to 100 to start with. It was noted that:
101, 101, 101 to [101]
99, 97, 95 to 1
-99, -97, -95 to -1
-101, -101, -101 to -101
were happening from (1, 101) to (50, 51) as optional sums of 4^50 of variations.
[11] x 5 + 1 = 56 while [101] x 50 + 1 = 5051.
We can know that 101 x 50 + 1 is the answer!
Answer: 5051
For +-1+-2+-3+-4...+-N..The general formula will be.. If (N)(N+1)/2 is even..Tn=(N)(N+1)/2+1 If (N)(N+1)/2 is odd..Tn=(N)(N+1)/2+2 So here (N)(N+1)/2=5050 which is even..so Tn=number of values of n=5051..
Here's how I did it: The maximum we can get is 5050 and the minimum is -5050. Since the sum can only be even, there are 5051 numbers with the 0 included.
So it is possible that we have 5051 distinct integers but we must prove it first: Based on the number "5050", we can get any other number less than it, and even of course, for example: 5048=5050-2 (the first term which is 1). 5046=5050-2 (the second term which is 2). . . . 5000=5050-2*(the 25th term which is 25). This can be done with every single term until we reach -5050 which is the minimum value. Note that when you reach the 100th term(100), you will have to start summing up terms(1st and the 100th then 2nd and the 100th). Since it is proved as aforementioned, we have 5051 distinct integers.
Problem Loading...
Note Loading...
Set Loading...
Since the sum involves 50 odd numbers, the result will always be even. Also, the sum will be between − 5 0 5 0 and 5 0 5 0 = ∑ k = 1 1 0 0 k . We claim that, conversely, all even numbers between − 5 0 5 0 and 5 0 5 0 (inclusive) are attained, so that there are 5 0 5 1 such numbers; let's not forget about 0.
We will show that if any number n other than − 5 0 5 0 can be written this way, then n − 2 can be written this way as well; counting down from 5 0 5 0 , in steps of 2 , this gives us what we want.
If n can be written this way, let m be the smallest number in a chosen representation of n that comes with the positive sign. If m = 1 , replace 1 by − 1 to write n − 2 this way. If m > 1 , switch the signs of both m and m − 1 to write n − 2 this way. For example, if n = . . . . − 3 + 4 . . . . , then n − 2 = . . . . + 3 − 4 . . . , with all the other signs remaining the same.