Prove that $n$ is also a power of $2$. An arithmetic progression consists of integers. The sum of the first $n$ terms of this progression is a power of two. 
Prove that $n$ is also a power of two.
Source :http://www.math.ucla.edu/~radko/circles/lib/data/Handout-967-1026.pdf
 A: The sum of an arithmetic progression equals the number of terms times an integer or a half-integer. If twice the sum is a power of two, then both factors are a power of two.
A: See that the sum of first $n$ terms is $s = \frac{n * (a_{1} + a_{n})}{2} = 2^{k}(say)$ for $k \in \mathbb{Z}$ ,now both $a_{1},a_{n}$ are integers means that $n$ must be a power of $2$.
A: $$S_n=\frac{n}{2}\left(a + a_n\right) = 2^k$$
$$\log_2 (S_n)=\log_2(n) + \log_2(a+a_n) = {k+1}$$
Since $k+1$ is an integer, $\log_2(n)$ must be an integer as well. Hence, $n$ is a power of $2$.
A: Given first term $a$ and common difference $d$, sum of first $n$ terms, $S_n$ is given by
$$S_n=\frac{n}{2}\left(2a+(n-1)d\right)$$
Let $S_n=2^k$ where $k\in\mathbb Z$. We must have $k\ge 0$ as the arithmetic progression consists of integers.
$$2^k=\frac{n}{2}\left(2a+(n-1)d\right)$$
$$2^{k+1}=n\left(2a+(n-1)d\right)\in\mathbb Z^+$$
As the prime factorization of an integer is unique, $n$ must be of the form $2^r$, where $r\ge0$. Thus, $n$ must be a power of $2$.
