# Integer functions indices in a sum

I have some troubles with plotted A versus p, especially for the function F(s,l,p), I don´t know how deal with the integer functions indices of the sum. How can I input such a sum to Mathematica?. Thanks for advance

• Please post the WL code you have tried. Have you looked at the documentation for Sum? – Rohit Namjoshi Sep 22 at 0:37

Hope this is what you're looking for:

F[s_, l_, p_] := Sum[((-1)^k (1/2 Sinh[s])^(2 k))/(k! (p - 2 k)! (k + (l - p)/2)!), {k, (p - l)/2, p/2}]
A[q_, s_, b_, p_] := Sum[Sqrt[q! p! (1/2 Tanh[s])^((l - p)/2)]/(Cosh[s])^(p + 1/2) b^(l - q) E^(-1/2 b^2) F[s, l, p] LaguerreL[q, l - q, b^2] Cos[\[Pi]/2 (p - l)], {l, q, Infinity}]^2

q = 2;
s = 1;
b = 5 (Cosh[s] + Sinh[s]);
p = Table[i, {i, 0, 80, 1}];
plotpoints = Table[{pi, A[q, s, b, pi]}, {pi, p}];
ListPlot[plotpoints]


Seems like the convergence is very slow. I don't know much about this sum so maybe it can be sped up by vectorizing. I just lowered the max number for l from Infinity to 1000. Here's the plot I got:

• I did the same that you, but this is not answer I looking for, I posted above the result that I expect it, I must add, however, that m-j is always an even number, for odd numbers the cosine is zero. – yhiel Sep 22 at 17:00