# 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.

• Hint: if you know $a_1$ and $a_n$, what is the sum of the first $n$ terms? – lulu Feb 13 '17 at 12:52
• @Amar30657 it would be better for you if you could show your approach ! – BAYMAX Feb 13 '17 at 12:52

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$.
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$.
• In fact we have proved the stronger statement that if $a_i$ are the terms of any arithmetic progression, and if (for a particular $n$) $a_1+a_n$ happens to be an integer, then if the sum $s=a_1+a_2+\ldots+a_n$ is a power of two, then $n$ is a power of two. – Jeppe Stig Nielsen Feb 13 '17 at 14:29
$$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$.