For a positive integer $n$, define a function $f_n(x)$ on the interval $[0, n+1]$ as follows:
\[ f_n(x) = \left( \sum_{i=1}^{n} |x-i| \right)^2 - \sum_{i=1}^{n} (x-i)^2. \]
Let $a_n$ be the minimum value of $f_n(x)$. Find the value of:
\[ \sum_{n=1}^{11} (-1)^{n+1} a_n. \]

Let's think step by step and output the final answer within \boxed{}.
user