MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).

2 Fixed a typo (inserted a factor n in line -5).

There are probably lots of ways to see this, but here's one: let $S_1$ be the sum above, and let $$S_2 = \sum_{k=(n+1)/2}^{n-1} k \left( \frac{k}{n} \right).$$ Then $$S_1 + S_2 = S = \sum_{k=1}^{n-1} k \left( \frac{k}{n} \right).$$ Now you can rewrite $S$ (since $x \to 2x$ is a bijection mod $n$) as $$S = \sum_{k=1}^{(n-1)/2} 2k \left( \frac{2k}{n} \right) + \sum_{k=(n+1)/2}^{n-1} (2k-n) \left( \frac{2k}{n} \right) = 2S - n \sum_{k=(n+1)/2}^{n-1} \left( \frac{k}{n} \right),$$ where we used $(2/n) = 1$. Finally, we have $$S = 2S + n \sum_{k=1}^{(n-1)/2} \left( \frac{k}{n} \right),$$ by changing $k$ to $n-k$ in the summation and using $(-1/n) = -1$. So $S = -\sum_{k=1}^{(n-1)/2} n\sum_{k=1}^{(n-1)/2} \left( \frac{k}{n} \right)$.

On the other hand, we can switch the index in $S_2$ from $k$ to $n-k$ as well, to get $$S_2 = \sum_{k=1}^{(n-1)/2} (n-k) \left( \frac{n-k}{n}\right) = -n \sum_{k=1}^{(n-1)/2} \left( \frac{k}{n} \right) + \sum_{k=1}^{(n-1)/2} k \left( \frac{k}{n} \right) = S + S_1 = 2S_1 + S_2.$$ (We used $(-1/n) = -1$ again).

Therefore $S_1 = 0.$

1

There are probably lots of ways to see this, but here's one: let $S_1$ be the sum above, and let $$S_2 = \sum_{k=(n+1)/2}^{n-1} k \left( \frac{k}{n} \right).$$ Then $$S_1 + S_2 = S = \sum_{k=1}^{n-1} k \left( \frac{k}{n} \right).$$ Now you can rewrite $S$ (since $x \to 2x$ is a bijection mod $n$) as $$S = \sum_{k=1}^{(n-1)/2} 2k \left( \frac{2k}{n} \right) + \sum_{k=(n+1)/2}^{n-1} (2k-n) \left( \frac{2k}{n} \right) = 2S - n \sum_{k=(n+1)/2}^{n-1} \left( \frac{k}{n} \right),$$ where we used $(2/n) = 1$. Finally, we have $$S = 2S + n \sum_{k=1}^{(n-1)/2} \left( \frac{k}{n} \right),$$ by changing $k$ to $n-k$ in the summation and using $(-1/n) = -1$. So $S = -\sum_{k=1}^{(n-1)/2} \left( \frac{k}{n} \right)$.

On the other hand, we can switch the index in $S_2$ from $k$ to $n-k$ as well, to get $$S_2 = \sum_{k=1}^{(n-1)/2} (n-k) \left( \frac{n-k}{n}\right) = -n \sum_{k=1}^{(n-1)/2} \left( \frac{k}{n} \right) + \sum_{k=1}^{(n-1)/2} k \left( \frac{k}{n} \right) = S + S_1 = 2S_1 + S_2.$$ (We used $(-1/n) = -1$ again).

Therefore $S_1 = 0.$