0

I found in Wiki following identities. I think these are very nice. But I don't know how prove these identities.

  1. $!n = \left[\dfrac{n!}{e}\right] = \left\lfloor \dfrac{n!}{e} + \dfrac{1}{2}\right\rfloor, n \geq 1$, where $!n$ is the $n$th derangement.

  2. $!n = n[!(n - 1)] + (-1)^n$

Is there nice proof or some hint?

N. F. Taussig
  • 76,571
c-301
  • 21

3 Answers3

3

For this I find it more convenient to write $d_n$ for $!n$. Start with the recurrence

$$d_{n+1}=n(d_n+d_{n-1})\;;$$

you can find a proof here. Now rewrite the second identity that you want to prove as

$$d_n-nd_{n-1}=(-1)^n\;;$$

we’ll prove this by induction on $n$. I’ll let you verify the base case; the induction step is

$$\begin{align*} d_{n+1}-(n+1)d_n&=n(d_n+d_{n-1})-(n+1)d_n\\ &=nd_{n-1}-d_n\\ &=-(d_n-nd_{n-1})\\ &=-(-1)^n\\ &=(-1)^{n+1}\;. \end{align*}$$

The first identity is derived from the exact formula

$$d_n=n!\sum_{k=0}^n\frac{(-1)^k}{k!}\;,$$

a proof of which can be found here, and the Taylor series

$$e^x=\sum_{k\ge 0}\frac{x^k}{k!}\;,$$

which at $x=-1$ becomes

$$\frac1e=\sum_{k\ge 0}\frac{(-1)^k}{k!}\;.$$

Now for each $n$ we have

$$\begin{align*} \frac{n!}e&=n!\sum_{k=0}^n\frac{(-1)^k}{k!}+n!\sum_{k\ge n+1}\frac{(-1)^k}{k!}\\ &=d_n+n!\sum_{k\ge n+1}\frac{(-1)^k}{k!}\;, \end{align*}$$

so

$$\left|d_n-\frac{n!}e\right|=n!\left|\sum_{k\ge n+1}\frac{(-1)^k}{k!}\right|\;.$$

The series $\sum_{k\ge n+1}\frac{(-1)^k}{k!}$ is alternating, and the absolute value of its first term is $\frac1{(n+1)!}$, so

$$\left|\sum_{k\ge n+1}\frac{(-1)^k}{k!}\right|<\frac1{(n+1)!}\;.$$

Thus, for $n\ge 1$ we have

$$\left|d_n-\frac{n!}e\right|=n!\left|\sum_{k\ge n+1}\frac{(-1)^k}{k!}\right|<\frac{n!}{(n+1)!}=\frac1{n+1}\le\frac12\;.$$

Since $d_n$ is an integer, this means that it’s the integer nearest to $\frac{n!}e$, denoted by $\left[\frac{n!}e\right]$, which is $\left\lfloor\frac{n!}e+\frac12\right\rfloor$.

Brian M. Scott
  • 616,228
1
  1. The formula for derangements is given by $$ !n = \sum_{i=0} ^n {n \choose i} (-1)^{n-i}i! $$ which can be rewritten as $$ !n =n!\left( 1 - \frac{1}{1!} + \frac{1}{2!} - \dots + (-1)^n \frac{1}{n!}\right) $$ Now $$ \frac{1}{e} = 1 - \frac{1}{1!} + \frac{1}{2!} - \dots + (-1)^n \frac{1}{n!} + \sum_{i\geq n+1} (-1)^{i} \frac{1}{i!} $$ Now you can use these to say something about $\left|\frac{n!}{e} - !n\right|$.

The second question can be proved combinatorially, but requires a bit of work. See Section 2.2 and exercise/solution 2.8 in Enumerative Combinatorics for more information,

0

Here is another way to prove the second identity:

$\displaystyle D_n=n!\left( 1 - \frac{1}{1!} + \frac{1}{2!} - \dots + (-1)^n \frac{1}{n!}\right)=n\bigg[(n-1)!\left( 1 - \frac{1}{1!} + \frac{1}{2!} - \dots + (-1)^n \frac{1}{n!}\right)\bigg]$

$\displaystyle=n\bigg[(n-1)!\left( 1 - \frac{1}{1!} + \frac{1}{2!} - \dots + (-1)^{n-1} \frac{1}{(n-1)!}\right)+(-1)^n\frac{1}{n}\bigg]=nD_{n-1}+(-1)^n$

user84413
  • 27,211