Is there a clean way to simplify the following series:
$$ 0.5^2(1-2*0.5^2)+0.5^3(1-2*0.5^3)+\cdots +0.5^k(1-2*0.5^k) $$ where k = 1, 2, ... ∞
Using R led to the convergence point = 1/3
n = 10000
x = rep(0,n-1)
for (i in 2:n){
print(i)
x[i]= (0.5^as.numeric(i))*(1-0.5^as.numeric(i)-0.5^as.numeric(i))
}
sum(x)