@adel-00 I will mention that -- because your code has no comments, and you gave no description -- I have very little idea what it's supposed to do.
In particular, lines such as,
seem strange to me. I suspect that it doesn't do what you think it does, because the 2/3 factor is multiplied repeatedly against the earlier L[i] values. It's not just a simple summation.
So I'm going to exclude any multiplicative factors below. You can put them in, if you're certain you know what they mean and do.
You don't have to add up (all, or just some) of the L[i] while inside the loop. You can easily do that afterwards as well, using whatever formulas you choose. For example,
#odds := seq(2*n-1, n=-4..5);
for i from -4 to 5 do
sumodd[i] := add(L[2*n-1], n=-4..i);
#plot([seq([d[i], Re(sumodd[i])], i=-4..5)],color=black);
#evens := seq(2*n, n=-5..5);
for i from -5 to 5 do
sumeven[i] := add(L[2*n], n=-5..i);
#plot([seq([d[i], Re(sumeven[i])], i=-5..5)],color=black);
It's not clear (to me) that any of the code is doing what you expect. I suggest you go over it carefully.