Power series with alternating exponent
Mathematically, we have $4^{(-1)^k} = \frac18 (17+15(-1)^k)$ for all integers $k$. However, this identity is not being used for the computation of $\sum_{k=0}^\infty 4^{(-1)^k} x^k$:
sage: sum(4^((-1)^k)*x^k, k, 0, oo)._giac_().normal().sage()
sum(4^((-1)^k)*x^k, k, 0, +Infinity)
However:
sage: sum(1/8*(17+15*(-1)^k)*x^k, k, 0, oo)._giac_().normal().sage()
-1/4*(x + 16)/(x^2 - 1)
Is there a way to compute the first expression with Sage or is it possible to implement this process so that Sage can handle such expressions automatically?