Why does $\lim_{n\rightarrow \infty }\left(1+\frac{\cos(n\pi )}{n}\right)^{n}$ NOT exist?

Why doesn't the following limit exist? $$\lim_{n\rightarrow \infty }\left(1+\frac{\cos(n\pi )}{n}\right)^{n}$$

I write that because $$\cos$$ has values in $$[-1,1]$$ and $$n\rightarrow \infty$$ this limit can't exists but I don't know if I'm right.

• The expression amounts to $\left(1\pm\frac1n\right)^n$ which tends to $e^{\pm1}$. – Yves Daoust Feb 2 at 16:12

$$\cos (n \pi)=(-1)^n$$. Now look at the subsequences $$(a_{2n})$$ and $$(a_{2n+1})$$.

• Thank you for your help :) – DaniVaja Feb 2 at 16:39
• So limit of $a_{2n}=(1+\frac{cos(2n\pi )}{2n})^{2n}$ is different from limit of $a_{2n}=(1+\frac{cos(2n\pi+\pi )}{2n+1})^{2n+1}$ because $\cos (n \pi)=(-1)^n$ which gives me $1$ or $-1$ and that's why limit doesn't exists, because cos oscilating between $-1$ and $1$.Is my answer correct ? – DaniVaja Feb 2 at 16:43

Hint:

A sequence $$a_n$$ convergence to $$L$$ if and only if every sub-sequence convergence to $$L$$.

Consider the sub-sequences $$a_{2n},a_{2n+1}$$ of $$a_n =(1+\frac{\cos(n\pi )}{n})^{n}$$.

• So limit of $a_{2n}=(1+\frac{cos(2n\pi )}{2n})^{2n}$ is different from limit of $a_{2n}=(1+\frac{cos(2n\pi+\pi )}{2n+1})^{2n+1}$ because $\cos (n \pi)=(-1)^n$ which gives me $1$ or $-1$ and that's why limit doesn't exists, because cos oscilating between $-1$ and $1$.Is my answer correct? – DaniVaja Feb 2 at 16:39
• @DaniVaja yes that's exactly the idea. – Yanko Feb 3 at 11:02