two examples in analysis I want to ask for two examples in the following cases:
1) Given a bounded sequence $\{a_n\}$, $$\lim_{n\to \infty}{(a_{n+1}-a_n)}=0$$ but $\{a_n\}$ diverges.
2) A function defined on real-line $f(x)$'s Taylor series converges at a point $x_0$ but does not equal to $f(x_0)$.
Thanks for your help.
Edit
in 2), I was thinking of the Taylor series of the function $f$ at the point $x_0$.
 A: Eric gave an example of 2). As regards 1), let $a_n=\cos(2\pi k/2^i)$ if $n$ is between $2^i$ and $2^{i+1}$ and $n=2^i+k$ with $0\le k\le 2^{i+1}-1$. Then $|a_{n+1}-a_n|\le2\pi/2^i\le4\pi/n$ hence $a_{n+1}-a_n\to0$ but the limit set of the sequence $(a_n)$ is $[-1,1]$.
Another example is $a_n=\cos(\log n)$. Then $|a_{n+1}-a_n|\le1/n$ and the limit set is $[-1,1]$.
A: For 1):
$$
1,\frac12,0,\frac13,\frac23,1,\frac34,\frac24,\frac14,0,\frac15,\frac25,\frac35,\frac45,1,\frac56,\frac46,\frac36,\frac26,\frac16,0,\frac17,\dots
$$
I leave it to you to find an explicit formula for $a_n$.
A: 2) Define the function $f$ as follows:  $$f(x)=e^{-1/x^2}\ \text{if } x>0$$ and $$f(x)=0\ \text{if } x\leq 0.$$  Now consider the Taylor series centered at zero.  This provides an example of a non-analytic $C^\infty$ function.  This taylor series converges everywhere, but is identically zero, and $f(x)$ is not identically zero.
Hope that helps,
A: 2) It is classical:
$$f(x)=\begin{cases} \exp (-\tfrac{1}{x}) &\text{, if } x>0 \\ 0 &\text{, if } x\leq 0 \end{cases}$$
and $x_0=0$.
A: Hint for 1): Find a sequence $t_n$ which tends to infinity with $t_{n+1}-t_n \to 0$ as $n \to \infty$, and sample a periodic function such as $\sin(x)$ at the points $t_n$. 
