In this question, $f$ denotes the linear form defined by $\forall M \in \mathcal{M}_n(\mathbb{R}), f(M) = \sum_{j=1}^n \sum_{i=j}^n m_{i,j}$, and $A$ is the matrix such that $\forall M \in \mathcal{M}_n(\mathbb{R}), f(M) = \operatorname{Tr}(AM)$.
Show that $M_n = \sum_{k=1}^n \dfrac{1}{2\cos\dfrac{k\pi}{2n+1}}$.