Let n be a postive integer greater than 1. Show that n can be written as a sum of at least 2 consecutive postive integers if and only if n is not a power of 2.
First, we'll show that if n is not a power of 2, then it can be written as a sum of at least 2 consecutive positive integers.
If n is an odd number, say n = 2k + 1, then n = k + (k+1), and since n is at least 3, k is at least 1, and we have written n as a sum of 2 consecutive positive integers.
If n is an even number, but not a power of 2, then it has an odd factor, so we can write n as 2ks, where s is an odd number greater than or equal to 3. Let s = 2r + 1. Then:
n = (2k - r) + (2k - r + 1) + ... + (2k + r - 1) + (2k + r)
In the decomposition above, there may be negative or zero terms. But note that:
(2k + r) - (r - 2k) = 2k+1 > 1
So if there are negative terms, then for each one there is a corresponding positive terms, plus there are at least 2k+1 postive terms left over. Hence we can just remove any zero term, and pairs of matching positive and negative terms, and we're left with n as the sum of at least two consecutive positive integers.
To finish the proof, we must show that if n can be written as a sum of consecutive integers, then it is not a power of 2. Let:
n = a + (a+1) + (a+2) + ... + (a+t)
where t > 0. This can be rewritten as:
n = (t+1)a + t(t+1)/2 = (t+1)(2a + t)/2
If t is even, then n is a multiple of t+1, which is odd, so n cannot be a power of 2. If t is odd, then 2 divides evenly into t+1, so n is a multiple of 2a+t, which is odd, so again n cannot be a power of 2.