I don’t quite understand your question. Are you asking how to translate the above expression to code ? Please clarify
no this is math problem,i want to know what is it
It is a simple exercise on sum of the geometric progression.
We have by the formula
(a + b)^2 = a^2 + 2 * a * b + b^2
Sum[(2^k + 1/2^k)^2 : 1<=k<=n] =
Sum[2^(2 * k) + 2 + 1/(2^(2 * k)) : 1<=k<=n] =
2 * n + Sum[4^k + (1/4)^k : 1<=k<=n] =
2 * n + (4^n-1) * 4/3 - ((1/4)^n-1) * 1/3 =
1/3 * (-3 - 4^(-n) + 4^(1 + n) + 6 * n)
Also refer to this
No way you can delete this now after I write the explanation
If it is your homework and you don’t want others to see that you ask for help then it will be a lesson to you.