Problem

Source: 2021 Turkey TST P6

Tags: algebra, Turkey, equation, n-variable equation, construction



For which positive integers $n$, one can find real numbers $x_1,x_2,\cdots ,x_n$ such that $$\dfrac{x_1^2+x_2^2+\cdots+x_n^2}{\left(x_1+2x_2+\cdots+nx_n\right)^2}=\dfrac{27}{4n(n+1)(2n+1)}$$and $i\leq x_i\leq 2i$ for all $i=1,2,\cdots ,n$ ?