Maximizing quadratic forms

Consider the maximization problem $$\text{maximize} \quad Q(x)= \sum_{i<j} a_{ij} x_i x_j \quad \text{subject to} \quad \sum_{i}x_i^2=1,$$ and let $M$ be maximum value obtained by $Q$ under such constraint. Suppose that $$ \begin{cases} a_{ij}=0 & \text{if $i+j\equiv 0\mod 2$,} \\ a_{ij}>0 & \text{if $i+j\equiv 1\mod 4$,} \\ a_{ij}<0 & \text{if $i+j\equiv 3\mod 4$.} \end{cases} $$ I […]