A Test for Powers of 2

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.

Solution