# Proving any number of the form $2^n$ can't be written as the sum of k consecutive numbers.

I think i have proved that any number of the form $2^n$ can't be written as the sum of k consecutive positive integers, but i would be grateful if i could have some clarification as to whether this is a correct and valid proof or not.

Let $g=x+(x+1)+(x+2)+(x+3)+...+(x+(k-1))$, hence g is the sum of k consecutive positive integers.

$g=kx+\sum_{d=1}^{k-1}d$

Hence, $g=kx+\frac{k(k-1)}{2}$

Rearranging for x we find, $x=\frac{g}{k}-\frac{(k-1)}{2}$

So, for certain values of $k$, we can be sure that a positive integer value of $x$ can be found, and hence $g$ can be written as the sum of $k$ consecutive positive integers.There are two cases for $k$ to considor:

Case 1)

$k$ is odd. If $x$ exists, it must be the case $k$ | $g$, as for odd values of $k$, $\frac{(k-1)}{2}$ will alwyas be an integer, and hence $x$ will.

Case 2)

$k$ is even. $k$ does not divide $g$, but $\frac{g}{k}$ must be a multiple of $\frac{1}{2}$, and hence equals $\frac{h}{2}$, for some odd $h$.

Letting $j=2^n$, assume that we can write $j$ as the sum of $k$ consecutive positive integers.

If $k$ is odd, then if a $k$ exists, it must divide $j$, by Case 1. But, $j$ has no odd factors as it is a power of two, hence $k$ could not be odd.

If $k$ is even, by Case 2 it mut be the case $k$ does not divide $j$. Also, $\frac{j}{k}=\frac{h}{2}$, for some odd $h$.

But, this implies $2j$ has an odd factor, $h$. but, as $2j$ is a power of $2$, it can't have odd factors. So, $k$ can't be odd.

Hence, $k$ is neither odd or even, and this is a contradiction to our assumption. Hence no $x$ exists, and hence and number of the form $2^n$ can't be written as the sum of $k$ consecutive positive integers.

Any feedback on this proof would be appreciated.

• I had to look around to find the justification for "if $k$ is even then $k$ cannot divide $g$" which is that $x=g/k +(k-1)/2$. (If $k|g$ and $k$ is even then $(k-1)$ and $x$ are not integers.) There is a flaw: The result is (trivially) false if you don't require $k>1$: In the case where $k$ is odd ,$k$ divides$j$ but $j$ DOES have an odd factor: the number $1$. So if $k$ is odd then $k=1.$..... But other than this, it's a valid proof. – DanielWainfleet Feb 27 '17 at 23:01
• An alternate proof: Assume $k>1.$ A sum of $k$ consecutive positive integers is $a(a+1)/2- b(b+1)/2$ where $a,b$ are positive integers with $a-b=k\geq 2.$ Now $$a(a+1)/1-b(b+1)/2= ((a+1/2)^2-1/4)/2-((b+1/2)^2-1/4)/2=((a+1/2)^2-(b+1/2)^2)/2=(a+b+1)(a-b)/2.$$ If this equals $2^n$ then $(a+b+1)(a-b)=2^{n+1}.$ But one member of $S=\{a+b+1,a-b\}$ is odd and the other member is even, and they're both positive and their product is a power of two. This requires that the smaller member of $S$ is equal to $1$. That is, $a-b=1,$ contrary to $a-b\geq 2.$ – DanielWainfleet Feb 27 '17 at 23:14
• Are we allowed $k=1$? :-) – Joffan Feb 27 '17 at 23:19
• @Joffan. In day-to-day discourse, a consecutive number of things is usually only said when there are at least 2 of them, otherwise we usually say "a thing". (Except for the Toronto Maple Leafs, who occasionally have a winning streak of 1 consecutive game.).... In mathematics, it depends on the context, or the preference of the writer, so it's best to be explicit at the beginning. – DanielWainfleet Feb 27 '17 at 23:25

It is a bit slicker to do it in the other direction: Instead of starting with $g$ and looking for a way to write it as the sum of consecutive integers, start by a sum of $k\ge 2$ consecutive integers and show that its sum cannot be a power of two.
We use the general fact that the sum of a finite arithmetic sequence is $$(\text{number of terms})\frac{(\text{first term})+(\text{last term})}{2}$$
If there's an odd number of terms ($\ge 3$), then the first factor of this is divisible by some odd prime, and dividing by $2$ at the end cannot make that go away. So the sum is divisible by the same odd prime, and is not a power of $2$.
• Good, except, as I said in a comment, there is the unspoken assumption that $k>1.$..............+1 – DanielWainfleet Feb 27 '17 at 23:19