Prove $a_n = \begin{cases}1 & \text{if $n=2^k$ for some $k\in N$}\\ 0 & \text{otherwise} \end{cases}$ diverges. Prove $a_n = \begin{cases}1 & \text{if $n=2^k$ for some $k\in N$}\\ 0 & \text{otherwise} \end{cases}$ diverges.
I need to prove that this diverges but I am not sure how to do so. I know that it diverges because we can see that,
$a_n = 0,1,0,1,0,0,0,1...$
My attempt:
Case 1: When $L = 0$
let $\epsilon = 1$
$$|a_n-0| < 1$$
$$|a_n| < 1$$
Case 2: When $L = 1$
$$|a_n-1| < 1$$
By Triangle Inequality:
$$|a_n+a_n-1| \le |a_n| + |a_n-1|$$
$$|a_n+a_n-1| \le 1 + 1 = 2 \neq 1$$
Thus it diverges?
I'm not sure if this is a valid proof so if anyone can help me with this, that would be really appreciated.
 A: By diverges, we mean that the sequence doesn't converge. Note that if a sequence converges to a limit $L$ then every subsequence must converge to the same $L$.
Now you can easily see that the subsequence $a_{n_{2^k}} \rightarrow 1$ while you can find a subsequence that converges to $0$. Hence the original sequence doesn't converge.
A: You clearly know that the sequence diverges, and also why it diverges. But it looks as if you may be expected to use an  "$\epsilon$-$N$" argument. 
First we proceed very informally. If our sequence had a limit $b$, then $a_n$ will be very close to $a$ whenever $n$ is large enough. But the sequence has $0$'s arbitrarily far out, and also $1$'s arbitrarily far out, and $0$ and $1$  cannot be simultaneously  very close to $b$.
More formally, let $\epsilon=\frac{1}{10}$. If the sequence converges to $b$, then there is an $N$ such that if $n\gt N$ then $|a_n-b|\lt \epsilon=\frac{1}{10}$.
From this, we derive a contradiction.
There is an integer $p\gt N$ such that $a_p=0$. Also, there is a $q=2^k\gt N$ such that $a_q=1$. Now by the triangle inequality we have
$$1=|a_p-a_q| \le |a_p-b|+|b-a_q|\lt \frac{1}{10}+\frac{1}{10}=\frac{2}{10}.$$
This is impossible, since it is not the case that $1\lt \frac{2}{10}$.  
A: Try to go back to the definitions when you are doing proofs like this. You want to show that $a_n$ diverges, so what does it mean to diverge? A sequence converges if there exists some $L$ such that for any $\epsilon > 0$, we can find some $N$ such that for all $n\geq N$, $|L-a_n|<\epsilon$. Now, you're trying to hold that this condition does not hold for this sequence, so what would that mean? It would mean that for any $L$, there exists some $\epsilon>0$ such that for all $N$ there exists some $n\geq N$ where $|L-a_n|>\epsilon$. Side-note: you should get really good at taking the negations of propositions. Let's break that last sentence down:


*

*For all $L$

*there exists $\epsilon$ such that

*for all $N$

*there exists $n$ such that

*$|L-a_n|\geq \epsilon$


Now what? Well, we want to prove something about all $L$, so how about let's fix an arbitrary $L$ and prove that the claim holds. So fix $L$. Now we want to show that a certain $\epsilon$ exists. The trick here is to just call this value $\epsilon$ and hope we can find a specific value for it later which proves the claim. So we'll leave $\epsilon$ open right now and check the next part: for all $N$. Again, we're showing something holds for all $N$, so let's fix an arbitrary $N$ and prove it. Now, again, we have there exists *n*, so let's leave that $n$ free and hope we find something. Finally, we have $|L-a_n|\geq \epsilon$, which is really the meat of what we need to prove. So essentially, we have $L$ and $N$ fixed, and we are looking for a pair $\epsilon,n$ such that $|L-a_n|\geq \epsilon$ holds; if we can find this pair, we've proven the claim. Note that so far all of this has just been setup. The first step in a proof is figuring out exactly what you need to prove, and often that's the toughest part.
So, the question is simply, given a fixed $N$ and $L$, can we find $n$ and $\epsilon$ so that $L$ is more than $\epsilon$ away from $a_n$? To be safe, let's take epsilon to be very small and see what happens: let $\epsilon=\frac{1}{2}$ (we'll make it smaller later if we need to). We know that for any $n$, $a_n$ is either $0$ or $1$. So take $n$ to be the next power of 2 larger than $N$, so that $a_n=1$. Now, if $|L-1|\geq \frac{1}{2}$, we're done: we've found our pair $\epsilon,n$ such that the desired condition holds. Otherwise, we know that $a_{n+1}=0$ and $|L-1|<\frac{1}{2}$. Then, $1-L\leq |1-L| < \frac{1}{2}$. Rearranging, we get $\frac{1}{2}<L\leq|L|=|L-0|=|L-a_{n+1}|$, so we've found a pair such that the condition holds. Either way, we're done.
