[tex]Vom\ avea\ de\ analizat\ doua\ cazuri:\\
i)n=2k,k\in Z(altfel\ spus\ cand\ n\ este\ par):\\
E=\frac{1}{2}\cdot (-1)^{2k}+\frac{1}{4}\cdot (-1)^{2k+1}+\frac{3}{4}\cdot (-1)^{2k+2}\\
\\
E=\frac{1}{2}-\frac{1}{4}+\frac{3}{4}\\
\\
E=\frac{1}{2}+\frac{1}{2}=\boxed{1}\\
\\
ii)n=2k+1,k\in Z(cand\ n\ este\ impar)\\
E=\frac{1}{2}\cdot(-1)^{2k+1}+\frac{1}{4}\cdot(-1)^{2k+2}+\frac{3}{4}\cdot(-1)^{2k+3}\\
\\
E=-\frac{1}{2}+\frac{1}{4}-\frac{3}{4}=\boxed{-1}\\
[/tex]