# Proof of continued fraction identity of subfactorial

This question is part of a wider conjecture I have formed with someone which has its roots in Raayoni et al. (2019). The subfactorial function can be written as $$!n=\frac{n!}e+\frac{(-1)^n}{n+2-\dfrac1{n+3-\dfrac2{n+4-\cdots}}}$$ which is equation (17) of the MathWorld documentation of subfactorial.

Is there a proof of this identity that can be found in the literature or elsewhere?

## 1 Answer

This is a particular case of a well know cfrac that can be found almost in any good textbook on continued fractions: $${}_1F_1(1;c+1;z)=\sum_{k=0}^\infty\frac{z^{k}}{(c+1)_k}\\ =\cfrac{c}{c-z\,+}\,\cfrac{z}{c+1-z\,+}\,\cfrac{2z}{c+2-z\,+}\,\cfrac{3z}{c+3-z\,+}\,\ldots$$ Just put $$z=-1$$, $$c=n+1$$.

If you don't like special functions then consider https://en.wikipedia.org/wiki/Euler%27s_continued_fraction_formula . The formula above follows by direct application of Euler's formula.