Prove that the positive integers $n$ and that cannot be written as a sum of $r$ consecutive positive integers are of the form $n=2^l$ for some $l>=0$.

543 Views Asked by At

Prove that the positive integers $n$ and that cannot be written as a sum of $r$ consecutive positive integers are of the form $n=2^l$ for some $l>=0$.

Similar questions have been asked before but I want to know whether it can be proved by mathematical induction.

For $l=0, n=2^0=1$ which cannot be written as a sum of positive consecutive integers.

For $l=1, n=2$ which cannot be written as a sum of positive consecutive integers.

Let the expression be true for $l=m$,

Proof for $l=m+1$:

$n=2^{m+1}=2^m.2$

$2^m$ cannot be written as a sum of positive consecutive integers as assumed. Neither can $2$ be written in that way.

Hence, $2^m.2$ cannot be written as the sum of consecutive integers.

Is this correct? If no, can it be proved by mathematical induction in other any way?