Problem

Source: Polish MO Finals P4 2023

Tags: inequalities



Given a positive integer $n\geq 2$ and positive real numbers $a_1, a_2, \ldots, a_n$ with the sum equal to $1$. Let $b = a_1 + 2a_2 + \ldots + n a_n$. Prove that $$\sum_{1\leq i < j \leq n} (i-j)^2 a_i a_j \leq (n-b)(b-1).$$