<s>[INST] Exact value of expression Let
$$f(x)=\frac{4^x}{4^x+2}$$
and
$$S=\sum_{n=1}^{2005}f\left(\frac{n}{2005}\right)$$
What is the exact value of $S$?
I tried to write $a=4^{\large\frac{1}{2005}}$, then
$$S=\sum_{n=1}^{2005}\frac{a^n}{a^n+2}$$
but I still cannot simplify it. Is there any easy method?
 [/INST] Since $$f(x)+f(1-x)=\frac{4^x}{2+4^x}+\frac{4^{1-x}}{2+4^{1-x}}=\frac{4^x}{2+4^x}+\frac{2}{4^x+2}=1$$
you have:
$$\begin{eqnarray*}S&=&\sum_{n=1}^{2005}f\left(\frac{n}{2005}\right)=f(1)+\sum_{i=1}^{1002}\left(f\left(\frac{n}{2005}\right)+f\left(\frac{2005-n}{2005}\right)\right)\\&=&f(1)+1002=\frac{2}{3}+1002.\end{eqnarray*}$$
</s>