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.