Positive Integer is Sum of Consecutive Positive Integers iff not Power of 2

Theorem
Let $n \in \Z_{>0}$ be a (strictly) positive integer.

Then $n$ can be expressed as the summation of $2$ or more consecutive integers $n$ is not a power of $2$.

Necessary Condition
Let $a$ be the smallest of $m$ consecutive integers, where $m \ge 2$.

From Sum of Arithmetic Sequence, their sum is $\dfrac {m \paren {2 a + m - 1} } 2$.

$\dfrac {m \paren {2 a + m - 1} } 2$ is a power of $2$.

Then $m$ and $2 a + m - 1$ must also be powers of $2$.

Since $m \ge 2$, $m$ must be even.

Then $2 a + m - 1$ is odd, so it cannot be a power of $2$.

This is a contradiction.

Therefore any sum of $2$ or more consecutive integers cannot be a power of $2$.

Sufficient Condition
Let $n$ be an integer that is not a power of $2$.

Then $n$ contains an odd factor.

Let $d = 2 m + 1$ be such a factor.

Then $\dfrac n d - m, \dfrac n d - m + 1, \dots, \dfrac n d + m$ are $2 m + 1$ consecutive integers.

From Sum of Arithmetic Sequence, their sum is:


 * $\dfrac {\paren {2 m + 1} \paren {\dfrac n d - m + \dfrac n d + m} } 2 = \dfrac d 2 \times \dfrac {2n} d = n$.

Example
$18$ is not a power of $2$.

In fact, it has $3$ and $9$ as its odd factors.

By the construction demonstrated above, we can express $18$ as:


 * $18 = 5 + 6 + 7 = \paren {-2} + \paren {-1} + 0 + 1 + 2 + 3 + 4 + 5 + 6$