How do I define the following function in Sage and compute some values?
The function is $$P(n) = \sqrt{\frac{e^{-h}h^n}{n!}},$$
where $h$ is a real variable and $n$ is a nonnegative integer. I want to see the values of $P(n)$ for $h = 20$ from $n = 0$ to $n = 50$.
After this, I would like to use the function in other formulas such as $$A(n,t) = P(n)\cos(t\sqrt(n+1))\cos(\theta) - iP(n+1)$$
So, if you help me out with computing $P(n),$ I think I will be able to do the rest. Thank you!