Problems computing the DFT of finite length sequence I am having trouble finding the same answer as the solution manual for this sequence.
The problem asks to compute the DFT of
$$
x[n] = \begin{cases}
            1 &amp; \text{for even } n \in \{0\ldots N-1\}
         \\ 0 &amp; \text{for odd } n \in \{0\ldots N-1\}
       \end{cases}
$$
Setting up the DFT equation I agree with the solution manual
$$
  X[k]=\sum_0^{N-1}x[n]W^{kn}_{N}=\sum_0^{\frac{N}{2}-1}W^{k2n}_{N}=\sum_0^{\frac{N}{2}-1}e^{\frac{-j2\pi k(2n)}{N}}
$$
However when apply the closed form geometric series formula $\sum_0^Na^k=\frac{1-a^{N+1}}{1-a}$ I get
$$
\frac{1-e^{-j2\pi k}}{1-e^{\frac{-j2\pi k}{N}}}
$$
while the solution manual says its
$$\frac{1-e^{-j2\pi k}}{1-e^{\frac{-j\pi k}{N}}}$$
Note their lower exponent does not have a 2. Could someone explain where and how the 2 goes away?  Or does someone agree that the provided answer is incorrect?
This is question 8.5c from Oppenheim's Discrete-Time Signal Processing 3e.
Assuming $N$ even :
$$
\begin{align}
X[k] &amp;= \sum_{n=0}^{N-1} x[n] ~ W_N^{kn} ~~~,~~~k=0,1,...,N-1\\ \\
&amp;= \sum_{n=0}^{N/2-1} 1 ~ W_N^{k ~2n}  \\ \\
&amp;= \sum_{n=0}^{N/2-1} e^{-j 4\pi kn/N} \\ \\
&amp; = \frac{ 1 - e^{-j \frac{4\pi k}{N}N/2 }}{ 1 - e^{-j 4\pi k/N}} \\ \\ 
&amp; = \frac{ 1 - e^{-j 2\pi k}}{ 1 - e^{-j 4\pi k/N}}~~~,~~~k=0,1,...,N-1\\ 
\end{align}
$$
The result equals:
$$
X[k] = \begin{cases}{ ~~~ N/2 ~~~ ,~~~ k = 0, N/2 \\ ~~~~~~ 0 ~~~~~ ~ ,~ ~\text{otherwise} } \end{cases}
$$