How to prove this inequality $\frac{a_{1}a_{2}+a_{2}a_{3}+\cdots+a_{n-1}a_{n}}{a^2_{1}+a^2_{2}+\cdots+a^2_{n}}\le\cos{\frac{\pi}{n+1}}$ 
Let $a_{1},a_{2},\cdots,a_{n},n\ge 2$ be real numbers,show that
  $$\dfrac{a_{1}a_{2}+a_{2}a_{3}+\cdots+a_{n-1}a_{n}}{a^2_{1}+a^2_{2}+\cdots+a^2_{n}}\le\cos{\dfrac{\pi}{n+1}}$$

I think this result is interesting.
When $n=2$, clearly
$$\dfrac{a_{1}a_{2}}{a^2_{1}+a^2_{2}}\le\dfrac{1}{2}=\cos{\dfrac{\pi}{3}}=\dfrac{1}{2}$$
When $n=3$,
$$\dfrac{a_{1}a_{2}+a_{2}a_{3}}{a^2_{1}+a^2_{2}+a^2_{3}}\le\dfrac{\sqrt{2}}{2}.$$
This is true, because
$$a^2_{1}+\dfrac{1}{2}a^2_{2}\ge \sqrt{2}a_{1}a_{2},$$
$$\dfrac{1}{2}a^2_{2}+a^2_{3}\ge\sqrt{2}a_{2}a_{3}.$$
But for general $n$ I cannot prove it. 

Let $M_1 = \dfrac{1}{4\cos\dfrac{\pi}{n+1}}$ and $M_{k+1} = \dfrac{1}{4[\cos\dfrac{\pi}{n+1} - M_k]}$. If we can prove $0 <M_k < \cos\dfrac{\pi}{n+1}$ for $k < n -1$, then we have
\begin{align}
a_1a_2 \leq \cos\dfrac{\pi}{n+1}a_1^2 + M_1 a_2^2 \\
a_2 a_3 \leq (\cos\dfrac{\pi}{n+1} - M_1)a_2^2 + M_2 a_3^2 \\
\vdots \\
a_{n-1}a_n \leq (\cos\dfrac{\pi}{n+1} - M_{n-2})a_{n-1}^2 + M_{n-1}a_n^2
\end{align}
thus all we need to prove is $0 <M_k < \cos\dfrac{\pi}{n+1}$ for all $ k < n-1$ and $M_{n-1} = \cos\dfrac{\pi}{n+1}$ 
To do this, we aim at finding constants $x$ and $y$, such that $\exists c$ with
\begin{align}
\frac{M_{k+1} + x}{M_{k+1} + y} = c \frac{M_{k} + x}{M_{k} + y}
\end{align}
After simplication, we find we can take $x$ and $y$ as different solutions of $$4\lambda^2 + 4\cos\dfrac{\pi}{n+1}\lambda + 1 = 0$$ and $c = \frac{x}{y}$, i.e.:
\begin{align}
x = -\frac{1}{2}(\cos\dfrac{\pi}{n+1} + i \sin\dfrac{\pi}{n+1})= -\frac{1}{2}e^{i\theta}\\
y = -\frac{1}{2}(\cos\dfrac{\pi}{n+1} - i \sin\dfrac{\pi}{n+1}) = -\frac{1}{2}e^{-i\theta}\\
c = (\cos\dfrac{\pi}{n+1} + i \sin\dfrac{\pi}{n+1})^2 = e^{i2\theta}
\end{align}
wiht $\theta = \frac{\pi}{n+1}$
Then we have
\begin{align}
\frac{M_{n-1} - \frac{1}{2}e^{i\theta}}{M_{n-1} - \frac{1}{2}e^{-i\theta}} = e^{2(n-2)i\theta} \frac{M_{1} - \frac{1}{2}e^{i\theta}}{M_{1} - \frac{1}{2}e^{-i\theta}}
\end{align}
Since $M_1 = \dfrac{1}{2(e^{i\theta} + e^{-i\theta})}$, we get
\begin{align}
\frac{M_{1} - \frac{1}{2}e^{i\theta}}{M_{1} - \frac{1}{2}e^{-i\theta}} = e^{4i\theta}
\end{align}
Thus
\begin{align}
\frac{M_{n-1} - \frac{1}{2}e^{i\theta}}{M_{n-1} - \frac{1}{2}e^{-i\theta}} = e^{2ni\theta} = e^{-2i\theta}
\end{align}
Then we get easily $M_{n-1} = \dfrac{e^{i\theta} + e^{-i\theta}}{2}=\cos\frac{\pi}{n+1}$
Finally note that  if $M_k < \cos\frac{\pi}{n+1} - \frac{1}{4\cos\frac{\pi}{n+1}}$
$$M_{k+1} - \cos\frac{\pi}{n+1} = \dfrac{1 - 4\cos^2\frac{\pi}{n+1} + 4M_k \cos\frac{\pi}{n+1}}{4(\cos\frac{\pi}{n+1} - M_k)} < 0$$ 
Note also that $M_{k+1} - M_{k} = \dfrac{1 - 4\cos\frac{\pi}{n+1}M_k + 4M_k^2}{4(\cos\frac{\pi}{n+1} - M_k)} > 0$ when $M_k < \cos\frac{\pi}{n+1} $
since we know that $M_{n-2} = \cos\frac{\pi}{n+1} - \frac{1}{4\cos\frac{\pi}{n+1}}$, we can conclude $M_k$ is increasing for $k < n-1$, therefore $0<M_k < \cos\frac{\pi}{n+1}$ for $k < n-1$
