Loading [MathJax]/jax/output/CommonHTML/fonts/TeX/fontdata.js

Sums of Consecutive Integers

A fun fact I recently learned about is the following.

Claim . A natural number can be written as the sum of at least two consecutive positive integers if and only if it is not a power of 2.

Proof. Let n=2s(2k+1) for a positive integer k and non-negative integer s. First suppose that 2s>2k+1. Then

2ki=0(2sk+i)=2s(2k+1)k(2k+1)+2ki=1i=2s(2k+1)k(2k+1)+k(2k+1)=2s(2k+1)=n,

so n may be written as the sum of 2k+1 consecutive positive integers. On the other hand, suppose that 2s<2k+1. Then it’s straightforward to verify that n=2s+11i=0k(2s1)+i. This demonstrates that if n is not a power of 2, then it can be written as the sum of at least two consecutive positive integers. Finally, suppose that can be written as the sum of at least two consecutive positive integers. Then there exists positive integers k,m such that

n=mi=0k+i=k(m+1)+m(m+1)(1/2)=(m+1)(2k+m)(1/2)

If m is even, then 2 divides 2k+m and m+1 is odd, whence n is divisible by some odd prime. On the other hand, if m is odd, then 2s divides m+1 and 2k+m is odd, whence n is divisible by an odd prime. This demonstrates that n is not a power of 2.