A sequence $a\_0,a\_1,\dots,a\_n$ of real numbers is called *concave* if $a\_{0}=0$, and for each $0<i<n$, we have $a\_i\geq\dfrac{a\_{i-1}+a\_{i+1}}{2}$.


Find the largest $c(n)$ such that for every concave sequence $a\_0,a\_1,\dots,a\_n$ of non-negative real numbers, we have
$$c(n)\sum\_{i=1}^{n}a^2\_{i}\le \left(\sum\_{i=1}^{n}a\_{i}\right)^2 .$$


I know $c(n)=\dfrac{n-1}{2}$ is well Khinchine inequality. But is it the best $c(n)$?



it's convex sequence inequality
$\newcommand{\R}{\mathbb{R}}$


The constant $c(n)$ can be improved from $\frac{n-1}2$ to the optimal value
\begin{equation}
 c\_\*(n):=\frac{3n(n-1)}{2(2n-1)}
\end{equation}
for $n\ge2$. 


Indeed, for $i\in[n]:=\{1,\dots,n\}$, let 
\begin{equation}
 g\_i:=a\_i-a\_{i-1},\quad h\_i:=\frac12\,(g\_i-g\_{i-1})=\frac12\,(a\_i-2a\_{i-1}+a\_{i-2}),
\end{equation}
with $a\_{-1}:=0=a\_0$. Then for $j,k$ in $[n]$
\begin{equation}
 g\_j=2\sum\_{i=1}^jh\_i,
\end{equation}
\begin{equation}
 a\_k=\sum\_{j=1}^kg\_j=2\sum\_{j=1}^k\sum\_{i=1}^jh\_i
 =2\sum\_{i=1}^k h\_i \sum\_{j=i}^k 1=2\sum\_{i=1}^k h\_i (k-i+1), 
\end{equation}
\begin{equation}
 \sum\_{k=1}^n a\_k=2\sum\_{k=1}^n \sum\_{i=1}^k h\_i (k-i+1)
 =2\sum\_{i=1}^n h\_i\sum\_{k=i}^n(k-i+1)=
 \sum\_{i=1}^n h\_i (n-i+2)(n-i+1)=:A\_1. 
\end{equation}


Note that $h\_1=a\_1/2\ge0$ and $h\_i\le0$ for $i=2,\dots,n$. So, 
the best constant $c\_\*(n)$ is the reciprocal of the maximum of $\sum\_{k=1}^n a\_k^2$ given the conditions that $A\_1=1$, $h\_1\ge0\ge h\_i$ for $i=2,\dots,n$, and $0\le a\_n/2=\sum\_{i=1}^k h\_i (k-i+1)$. These conditions on $(h\_1,\dots,h\_n)$ define a polytope $\Pi$ in $\R^n$. It is easy to see that for any extreme point $(h\_1,\dots,h\_n)$ of $\Pi$ at most two of the $h\_i$'s can be nonzero. If $0=h\_1[=a\_1]$, then by the concavity of the $a\_i$'s and condition $a\_0=0$, we have $a\_i\le0$ for all $i$, which contradicts the condition $\sum\_{k=1}^n a\_k=A\_1=1$. So, $h\_1>0$ and no more than one of $h\_2,\dots,h\_n$ is nonzero, so that for some $j\in\{2,\dots,n\}$, some real $c\ge0$, and all $i=2,\dots,n$
\begin{equation}
 h\_i=-c\_j1\_{\{i=j\}}. 
\end{equation}
Solving now the equation $A\_1=1$ for $c$, we get 
\begin{equation}
 c=c\_j:=\frac{h\_1 n(n+1)-2}{(n-j+2)(n-j+1)}. 
\end{equation}
With $c=c\_j$, we have 
\begin{equation}
 a\_n=\frac{2-h\_1 n(j-1)}{n-j+2}. 
\end{equation}
So, the conditions $c\ge0$ and $a\_n\ge0$ now become 
\begin{equation}
 \frac2{n(n+1)}\le h\_1\le\frac2{n(j-1)}. 
\end{equation}


Given this condition on $h\_1$ and the condition $2\le j\le n$, we can maximize in $j,h\_1$ the expression of $\sum\_{k=1}^n a\_k^2$, which is algebraic in $n,j,h\_1$. The maximum is indeed $\frac{2(2n-1)}{3n(n-1)}=1/c\_\*(n)$, attained at $j=2$ and $h\_1=2/n$. Details of this latter maximization can be seen in the [Mathematica notebook](https://my.pcloud.com/publink/show?code=XZfGtn7ZeuiE7qff5FYx6WFOHK0WeXFFvgsk) or its [pdf image](https://my.pcloud.com/publink/show?code=XZDGtn7Z4AATJNAndhH3cQTs5AXYPL6sADUV). 


