# Evaluate a double sum using Mathematica

I am evaluating using Mathematica, the double sum $$\sum_{u=0}^\infty \lbrace \sum_{k= u+1}^{u+y}[\dfrac{(1-a)}{4} (3/4)^k + 3a[(\dfrac{1}{2})^{k-1} - (\dfrac{3}{4})^{k-1} ]\rbrace$$, where $$'a'$$ is a constant and $$a>0$$ and $$y$$ is a parameter taking values in $$[1,\infty)$$.

I am having trouble evaluating this sum for very large values of $$y$$ due to recursion exceeding a specified value. I need to also find the value of this sum as $$y \rightarrow \infty$$. It is taking endless time even for $$y= 5000$$ and I had to abort the program.

I request suggestions on how I may resolve this problem in Mathematica.

• This FullSimplify@ Sum[Sum[(1 - a)/4 (3/4)^k + 3 a ((1/2)^(k - 1) - (3/4)^(k - 1)), {k, u + 1, u + y}], {u, 0, Infinity}] gives an answer analytically in V.13.1
– bmf
Aug 25, 2022 at 15:39

Clear["Global*"]

sum[a_, y_] =
FullSimplify@
Sum[(1 - a)/4 (3/4)^k + 3 a ((1/2)^(k - 1) - (3/4)^(k - 1)), {u, 0,
Infinity}, {k, u + 1, u + y}]

(* -3 4^-y (3^y - 4^y + (2^(2 + y) - 17 3^y + 13 4^y) a) *)


The limit as y approaches infinity

Limit[sum[a, y], y -> Infinity]

(* 3 - 39 a *)


Comparing with y == 5000

N[sum[a, 5000], 100] // Expand
`