Assume that $1a_1+2a_2+\cdots+na_n=1$, where the $a_j$ are real numbers... Assume that
$$
1a_1+2a_2+\cdots+na_n=1,
$$
where the $a_j$ are real numbers.
As a function of $n$, what is the minimum value of
$$1a_1^2+2a_2^2+\cdots+na_n^2$$
There is a similar question on Math StackExchange, but nobody gave a solid and conclusive answer, so I felt the need to repeat it here. I also think this question should be solved using Cauchy-Schwarz, Mean Inequality Chain, or Trivial Inequality, but I would appreciate any answer. Thanks!
 A: Let $\displaystyle\;\sigma = \frac{1}{\sum_{k=1}^n k} = \frac{2}{n(n+1)}$, we have
$$\sum_{k=1}^n k a_k^2 =
\sum_{k=1}^n \big(\underbrace{k(a_k - \sigma)^2}_I + \underbrace{2\sigma k(a_k - \sigma)}_J + k\sigma^2\big)$$
Notice the contribution for the first term $I$ is non-negative and
the contribution from the middle term $J$ vanishes, i.e.
$$J = 2\sigma\left(\sum_{k=1}^n k(a_k - \sigma)\right) = 2\sigma \left(\sum_{k=1}^n ka_k - \sigma\sum_{k=1}^n k\right) = 2\sigma\left(1 - \frac{\sigma}{\sigma}\right) = 0$$
We obtain
$$\sum_{k=1}^n ka_k^2 \ge \sigma^2 \sum_{k=1}^n k = \frac{\sigma^2}{\sigma} = \sigma = \frac{2}{n(n+1)}$$
Since this lower bound is achieved when all $a_k = \sigma$, the minimum value of the sum at hand is $\sigma$.
A: The above answer is nice but I'd just like to expand on the Cauchy inequality response in the linked question, since I think that's the most straightforward and illuminating way to do it (if you're going to study inner product spaces and their connection to matrices). No cleverness needed.  Most of this post is just clarifying notation!
Let the notation $\vec{\mathbb{1}}$ denote the vector $(1,1,\ldots,1)$ with all entries identically $1$, and $H$ be the matrix with diagonal elements $1,\cdots, n$
$$H=\begin{bmatrix}
1 & 0 & 0 & \cdots \\
0 & 2 & 0 & \cdots \\
0 & 0 & 3 & \cdots \\
\vdots & \vdots &\vdots & \ddots
\end{bmatrix}$$
Since $H$ is a positive definite real symmetric matrix, it defines an inner product as $\langle \vec{x}, \vec{y} \rangle_H = \vec{x}^T H \vec{y}$, for which the Cauchy-Schwartz inequality holds.  
Note that your problem is now to minimize $$||a||_H \ \ \ \ \text{subject to} \ \ \  \langle \vec{\mathbb{1}}, \vec{a} \rangle_H = 1$$
Now the Cauchy-Schwartz inequality gives us exactly that 
$$1 = |\langle \vec{\mathbb{1}}, \vec{a}  \rangle_H| \leq ||\vec{\mathbb{1}}||_H||\vec{a}||_H = \frac{n(n+1)}{2}\sum_{k=1}^n ka_k^2$$ where equality holds if and only if $\vec{a}$ is a scalar multiple of $\vec{\mathbb{1}}$ (that's a very important part of the inequality's full statement!!)
This last part guarantees that $\frac{2}{n(n+1)}$ minimizes $\sum_{k=1}^n ka_k^2$ and also that this value is attained uniquely by $\vec{a} = \frac{\vec{\mathbb{1}}}{||\vec{\mathbb{1}}||_H}$
A: A theorem about strictly convex functions: For  $f:\mathbb R\to \mathbb R,$ if  $f''(x)>0$ for all $x\in \mathbb R,$ then whenever $w_1,...,w_n$ are non-negative reals with $\sum_{j=1}^nw_j=1,$ and $a_1,...,a_n$ are in  $\mathbb R,$ then $$\sum_{j=1}^nw_jf(a_j)\geq f\left(\sum_{j=1}^nw_ja_j\right)$$ with equality iff $a_i=a_j$ whenever $w_i\ne 0\ne w_j.$
Let $f(x)=x^2$. Let  $w_j=\frac {j}{(n^2+n)/2}$ for $j=1,...,n.$ Let  $\sum_{j=1}^nja_j=1.$ The above theorem, by a direct calculation, implies that $\sum_{j=1}^nj a_j^2\geq 2/(n^2+n),$ with equality iff $a_j=2/(n^2+n)$ for all $j$.  
