TITLE: The behaviour of $\operatorname{Im}(!n)$
QUESTION [8 upvotes]: What's going on with the behaviour of the subfactorial's imaginary part? Background: Out of curiosity I tried to construct some recurrence relations using the Pochhammer symbol and out of those came some subfactorials. For example:
$$a_{n+1}=a_n+(3)_n=a_n+3(3+1)(3+2)...(3+n-1).$$
Mathematica gave me:
$a_n$ = $1/2 (-1)^n$ Gamma[$n+3$] Subfactorial[$-n-3$]$-$Subfactorial[$-3$].
Not having seen seen negative subfactorials before I googled "negative subfactorial" or "subfactorial of negative numbers" and some similar phrases, which gave 0 hits. Here's a plot:

I also plotted the Gamma function (just to have something to relate to). So, I don't understand the behaviour of the imaginary part. Looking closer at the values of $\operatorname{Im}(!n)$ it appears that
$$\sum _{n=-\infty}^0 \operatorname{Im}(!n)=-\frac{\pi}{e^2}.$$
Anyone who can shed some light on this? Some intuition? Better methods of visualization?

REPLY [7 votes]: Mathematica obviously defines subfactorial (cf. Eq. $(4)$ here) of an arbitrary complex number $s$ as
$$
!s=\frac{\Gamma(s+1,-1)}{e},\tag1
$$
where $\Gamma(s,z)$ is the upper incomplete gamma function. The expression for the
function for integer negative $s$ can be found here and reads for $z=-1$:
$$
\Gamma(-n,-1)
=\frac{(-1)^{n+1}}{n!}\left[i\pi+\operatorname{Ei}(1)-e\sum_{k=0}^{n-1}k!\right],\tag2
$$
where $\operatorname{Ei}(z)$ is the exponential integral.
Thus,
$$
\operatorname{Im}\; !(-n)=\frac{(-1)^{n}}{(n-1)!}\frac\pi e
$$
and the summation formula:
$$
\sum_{n=1}^\infty \operatorname{Im}\; !(-n)=-\frac{\pi}{e^2}
$$
immediately follows.