Not anonymous
- 143
- 58
fresh_42 said:Yes, ##1## isn't considered a factor, since you can always multiply as many units as you want and get any number of factors. Btw. ##-1## is also a unit, so you could argue that ##-1,1,3,-3## are four odd factors of ##6##. It simply makes no sense to allow units.
You're thinking way too complicated. Just calculate ##n=r+(r+1)+\ldots + (r+k)## and examine the factors.
Thanks to @fresh_42 for the hint! The answer is too obvious after that. I merely add some formalism for the sake of completeness. Before my earlier attempt, I had briefly considered working backward from the formula for sum of sequence as suggested by the hint but didn't proceed along that line as I thought I could arrive at a more "intuitive" solution that didn't need formulae, and that made giving a proof more complex that needed.
(11. Show that the number of ways to express a positive integer ##n## as the sum of consecutive positive integers is equal to the number of odd factors of ##n##.)
Any sequence of ##k## consecutive integers can be written as ##a+1, a+2, ..., a+k##. Here ##a+1## is the 1st integer in the sequence. The sum of this sequence is ##ka + \frac {k(k+1)} {2} = k(a + \frac {k+1} {2})##. We consider positive integer values for ##k##, i.e. ##k \in \{2, 3, 4, .., \}## (since ##k## is the length of a non-empty sequence, it must be a positive integer). We ignore ##k=1## as that will correspond to the degenerate case of single-element sequence ##(n)##, whereas the question apparently considers only sequences having more than 1 integer (except when ##n## itself is 1, in which case there is exactly one sequence satisfying the criteria, ##\{1\}##).
Thus, for every odd-factor ##k## of ##n##, we can find a unique sequence of consecutive positive integers that sum to ##n## whereas no such sequence would exist for even-factors of ##n##. Therefore, the number of ways to express any positive number ##n## equals the number of odd factors of ##n##
- We inspect values of ##k \in \{2, 3, .., \}## and look for the value of ##a## such that the sum of the sequence ##a+1, a+2, .., a+k## sums to ##n##, i.e. $$k(a + \frac {k+1} {2}) = n$$.
- If ##k## is NOT a factor of ##n##, then ##(a + \frac {k+1} {2})## would be non-integer in the above equation, implying that there is no integer ##a## such that a ##k##-length integer sequence will add up to ##n##, so we only need to consider those values of ##k## that are factors of ##n##.
- If ##k## is even, then ##\frac {k+1} {2}## would be a non-integer, so again (even if that ##k## is a factor of ##n##), there would be no ##k##-length integer sequence that adds up to ##n##
- If ##k## is an odd factor of ##n##, then ##\frac {k+1} {2}## is an integer and we can find an integer value for ##a## such that the ##k##-long sequence starting at ##a+1## adds up to ##n##. ##a## is given by the equation $$a = \frac {n} {k} - \frac {k+1} {2}$$
- The value of ##a## from the above equation could be negative, whereas we want only sequences that consist of positive integers alone. It is easy to show that any integer sequence ##a+1, a+2, .. a+k## that adds up to a positive value can be reduced to a positive integer sub-sequence if the original sequence starts with zero or a negative integer
- If the sequence starts with 0, will simply drop that as removing 0 does not alter the sum of the sequence
- If the sequence starts with a negative number and yet adds up to a positive number, then it must be the case that the sequence is of the form ##-x, -x+1, -x+2, ..., 0, 1, .., x, x+1, .., x+j## (for some positive integers ##x, j## satisfying the condition ##x = -(a+1)##, ##x+j = (a+k)##), i.e. for every negative integer ##-y##, the sequence should also contain the positive integer ##y## and the number of positive integers in the sequence should exceed the number of negative integers in the sequence. In effect, the negative integers get canceled out by their positive counterparts in the summation, so we can trim a left portion of original sequence and get a positive-integers-only sequence (##(x+1, x+2, ..., x+j)##) that adds up to the same value as the original sequence.
Thus, for every odd-factor ##k## of ##n##, we can find a unique sequence of consecutive positive integers that sum to ##n## whereas no such sequence would exist for even-factors of ##n##. Therefore, the number of ways to express any positive number ##n## equals the number of odd factors of ##n##