In article <[EMAIL PROTECTED]>, "Riley" <[EMAIL PROTECTED]> writes: > Hello All! > > After reading the kwiki on this subject provided by ton at > http://terje2.perlgolf.org/~golf-info/a1227-equivalence.html, > I think there is a more intuitive way to see that the number of ways > to write a number as the sum of sequences of consecutive positive > integers the same as the number of odd divisors of a number. > > If a number, y, is divisible by x, z times, then y can be expressed > as x + x + ... + x, z times. > > We can subtract the appropriate amount from the left values, and > increment the respective right values accordingly to rewrite this as > (x - c'1) + (x - c'2) + ... + x + ... + (x + c'2) + (x + c'1) > > An example demonstrates this more clearly: > 35 is divisible by 7, 5 times, so we can write: > > 35 = 7 + 7 + 7 + 7 + 7 > > and rewrite this to: > > 35 = (7-2) + (7-1) + 7 + (7+1) + (7+2), > > which is the same as: > > 35 = 5 + 6 + 7 + 8 + 9 > > For every odd divisor, there will be a corresponding summation. > The reason even divisors don't allow this should be obvious: we > need an odd number of components in order to be able to add > the same amounts on the right that we subtracted from the left... >
which corresponds to the bottom case in my drawing, so I have that case covered. It's not enough however. Consider the top case, and try to handle the 7 divisor: 14 = 7+7 => (7-1)+(7+1) => missing 7, oops => (7-0.5)+(7+0.5) => not integer, oops The other split: 14 = 2+2...2 (7 times) => (2-3)+(2-2)+(2-1)+2+(2+1)+(2+2)+(2+3) => 2-3 is smaller than one, even smaller than zero, oops