# Prove that the only numbers not expressible as a sum of consecutive positive integers takes the form $2^n$ for some $n \in \mathbb N$

I am trying to prove the above question. As I see it this is the statement that needs to be proved: a number $x$ has no odd factors $\iff$ $x$ cannot be formed by a sum of consecutive natural numbers.

First ($\Rightarrow$):

Assume $x$ has no odd factors (i.e., $x = 2^m$ for some $m$). Seeking a contradiction write $$x = k + (k+1) + \cdots + (k+n) = (n+1)k + {n(n+1) \over 2} = {(2k + n)(n+1) \over 2}$$

Now $2k+n$ and $n+1$ are of opposite parity, therefore one of them is odd. You cannot form an odd number without an odd factor, therefore contradiction.

Second ($\Leftarrow$):

Assume $x$ has at least one odd factor. We seek to prove that $x$ can be written as above...This is where I'm stuck

• Your question reads "not divisible by" rather than "not expressible as" so you need only to write the odd factor as a sum of consecutive integers - two should do it. – Mark Bennet Aug 24 '15 at 20:02
• Fixed thanks @MarkBennet. Could you elaborate on why writing this odd factor as a sum of consecutive integers helps me? As in the comment below I'm having trouble seeing where this gets me. – Moderat Aug 24 '15 at 20:13