I want to approximate the solution to the following sum, in such a way that I can plot the function for the variable $\phi$, for a fixed value of $\mu$.
\begin{equation} f(r(\phi), \mu)=4 e^{-\mu } r^2\sum_{n=0}^{\infty}\sum_{k=0}^{\infty}\frac{ \left(\frac{r^2}{r^2+1}\right)^k \binom{n}{k} \mu ^{k+n} \left(\frac{1}{r^2+1}\right)^{n-k} \left(n-\mu\frac{ \, _1F_1\left(-n;n+2;-r^2 \mu \right)}{\, _1F_1\left(-n;n+1;-r^2 \mu \right)}\right)^2}{\Gamma (k+n+1)} \end{equation}
with $r(\phi)=\tan \phi$
So now I want to represent that expression as a function of $\phi$ for fixed $\mu$. I define the Function to be summed
F[μ_, Φ_] := 4*((μ^(k + n)*Binomial[n, k]*(Cos[Φ]^2)^(-k + n)*(-n + ((1 + n)*μ*n!
*Hypergeometric1F1[-n, 2 + n, (-μ)*Tan[Φ]^2])/
((1 + n)!*Hypergeometric1F1[-n, 1 + n, (-μ)*Tan[Φ]^2]))^2*(Sin[Φ]^2)^k)/(E^μ*(k + n)!))*Tan[Φ]^2;
Now the following way to perform the summation will take indefinite time to compute even for a given value of $\phi$ and $\mu$ so I cannot use it to plot:
(NSum[NSum[N[F[μ,Φ]],{k,0,∞}],{n,0,∞}])/.{μ->1,Φ->Pi/4}
Sometime ago I would just truncate the series in a value that I think it is appropiate for example $n=10$ and $k=10$:
((NSum[NSum[N[F[μ, Φ]], {k, 0, 10}], {n, 0,
10}]) Tan[Φ]^2) /. {μ -> 1, Φ -> Pi/4}
(*2.23421*)
Note that if you sum all the terms up to $n=20$ and $k=20$ the result is the same. If you try to sum up to $n=30$ and $k=30$ the computation start to become so lengthy. It is an option to do the plot using a summation up to 10. But this arbitrary truncation doesn't look very scientific and for some other values of $\phi$ the number of terms contributing to the sum could change. Do you have an alternative way to make this plot?