63

I checked several thousand natural numbers and observed that $\lfloor n!/e\rfloor$ seems to always be an even number. Is it indeed true for all $n\in\mathbb N$? How can we prove it?

Are there any positive irrational numbers $a\ne e$ such that $\lfloor n!/a\rfloor$ is even for all $n\in\mathbb N$?

Micah
  • 36,226
  • 15
  • 79
  • 126
july
  • 1,211
  • 7
  • 9
  • 1
    I would hazard a guess that Stirling's approximation might help – abiessu Nov 02 '15 at 04:05
  • 4
    Stirling's approximation is nowhere near close enough to be any help. @abiessu – Thomas Andrews Nov 02 '15 at 04:06
  • These might be relevant: [Link #1](http://math.stackexchange.com/questions/705104/prove-number-of-derangement-is-odd-if-and-only-if-number-of-items-is-even), [Link #2](https://en.wikipedia.org/wiki/Rencontres_numbers). – triple_sec Nov 02 '15 at 04:17
  • 8
    Nice observation! Hint to your first question: Let $D_n$ be the number of derangements on $\left\{1,2,\ldots,n\right\}$ (this is called $!n$ in https://en.wikipedia.org/wiki/Derangement ). It is not hard to check that $\left\lfloor n!/e\right\rfloor = D_n$ for odd $n$ and $\left\lfloor n!/e\right\rfloor = D_n - 1$ for even $n$. So it suffices to prove that $D_n\equiv n+1 \mod 2$. This can be done by strong induction over $n$, using the recurrence $D_n = n D_{n-1} + \left(-1\right)^n$. – darij grinberg Nov 02 '15 at 04:17
  • 2
    $a=3e$ and $11e$ also seem to have this property. I did not found other candidates among integer multiples of $e$. – Vladimir Reshetnikov Nov 02 '15 at 05:35
  • 4
    I conjecture that for every $m\in\mathbb N^+$ the sequence $\lfloor n!/(m\cdot e)\rfloor =\,!n/m + (\text{some periodic sequence})$, where $!n$ is [subfactorial](http://mathworld.wolfram.com/Subfactorial.html) (the number of derangements). – Vladimir Reshetnikov Nov 02 '15 at 23:13
  • 3
    In particular, $\lfloor n!/(3e)\rfloor / 2 \stackrel {\color {gray} {?} } { = } \frac {!n}{6}- \frac {(-1)^n}{36}+\frac{\sin \left(\frac{\pi n}{3}\right)}{3 \sqrt{3}}+\frac{1}{9} \cos \left(\frac{\pi n}{3}\right)-\frac{1}{4}$. – Vladimir Reshetnikov Nov 02 '15 at 23:15

3 Answers3

35

Note that:

$$e^{-1}=\sum_{k=0}^\infty \frac{(-1)^k}{k!}$$

Then:

$$\frac{n!}e=n!e^{-1} = \left(\sum_{k=0}^{n} (-1)^k\frac{n!}{k!}\right) + \sum_{k=n+1}^{\infty} (-1)^{k}\frac{n!}{k!}$$

Show that if $a_n=\sum_{k=n+1}^{\infty} (-1)^{k}\frac{n!}{k!}$ then $0<|a_{n}|<1$ and $a_n>0$ if and only if $n$ is odd.

So the when $n$ is odd, the value is: $$\left\lfloor\frac{n!}{e}\right\rfloor=\sum_{k=0}^{n} (-1)^k\frac{n!}{k!}\tag{1}$$ When $n$ is even it is one less: $$\left\lfloor\frac{n!}{e}\right\rfloor=-1+\sum_{k=0}^{n} (-1)^k\frac{n!}{k!}\tag{2}$$

Now, almost all of these terms are even. The last term $n!/n!=1$ is odd. When $n$ is odd, the second-to-last term $n!/(n-1)!$ is odd, also. But all other terms are even.

So for $n$ odd, there are two odd terms in the sum, $k=n,n-1$.

For $n$ even, there are two odd terms in the sum, $-1$ and $k=n.$


The trick, then, is to show that the $a_n$ has these properties: $$\begin{align} &0<|a_n|<1\\ &a_n>0\iff n\text{ is odd} \end{align}$$

To show these, we note that $\frac{n!}{k!}$ is strictly decreasing for $k>n$ and $(-1)^k\frac{n!}{k!}$ is alternating. In general, any alternating sum of a decreasing series converges to a value strictly between $0$ and the first term of the sequence, which in this case is $\frac{(-1)^{n+1}}{n+1}.$

Thomas Andrews
  • 164,948
  • 17
  • 196
  • 376
27

The number of derangements of $[n]=\{1,\ldots,n\}$ is

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

so

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

which is less than $\frac1{n+1}$ in absolute value. Thus for $n\ge 1$, $d_n$ is the integer nearest $\frac{n!}e$, and

$$d_n=\begin{cases} \left\lfloor\frac{n!}e\right\rfloor,&\text{if }n\text{ is odd}\\\\ \left\lceil\frac{n!}e\right\rceil,&\text{if }n\text{ is even}\;. \end{cases}$$

The recurrence $d_n=nd_{n-1}+(-1)^n$ is also well-known. We have $d_0=1$, so an easy induction shows that $d_n$ is odd when $n$ is even, and even when $n$ is odd. Thus, for odd $n$ we have $\left\lfloor\frac{n!}e\right\rfloor=d_n$ is even, and for even $n$ we have $\left\lfloor\frac{n!}e\right\rfloor=\left\lceil\frac{n!}e\right\rceil-1$ is again even.

Brian M. Scott
  • 588,383
  • 52
  • 703
  • 1,170
  • 5
    You don't really need to go to "well-known" recurrences, since it is directly observable from your very first formula what the parity of $d_n$ is in each case, since all but possible the last two terms of $\frac{n!}{k!}$ are even. The parity of $d_n$ is the parity of $\frac{n!}{(n-1)!}+\frac{n!}{n!}=n+1$. – Thomas Andrews Nov 02 '15 at 04:52
12

Following @Vladimir's comment, I can show that $a=3e$ has this property. I don't find the proof very enlightening, though...

We have

$$ \frac{n!}{3e} = \sum_{k=0}^n \frac{1}{3}\frac{n!}{k!}(-1)^k + E $$ where $E$ is an error term that is less than $1$ in absolute value and also small by comparison with the other terms — so it won't affect the parity of the floor except in the case where it's negative and the initial sum is an integer.

In that initial sum, all but the last three individual terms will be even integers, as they will be multiples of $\frac{n(n-1)(n-2)}{3}=2\binom{n}{3}$. So we can neglect them.

The last three terms will take the form $$ (-1)^n \frac{1-n+n(n-1)}{3}=(-1)^n \frac{(n-1)^2}{3} $$

What this all boils down to is that we need $\left\lfloor (-1)^n \frac{(n-1)^2}{3}\right \rfloor$ to be even except when $\frac{(n-1)^2}{3}$ is actually an integer and also $n$ is even (which is the case where the error term is negative): that is, we want to check that $\left\lfloor (-1)^n \frac{(n-1)^2}{3}\right \rfloor$ is odd when $n \equiv 4 \pmod{6}$ and even otherwise. Which... it is, but it's not clear what the unifying principle is here, if any. And doing this for $11e$ seems possible, but horrifying. (One easier approach to proving this for $a=11e$ would be to just notice that, by this kind of argument, we need only consider the congruence class of $n$ modulo $22$, and then explicitly checking that $\lfloor 0!/(11e)\rfloor, \lfloor 1!/(11e)\rfloor,\dots,\lfloor 21!/(11e)\rfloor$ are all even. But that's if anything even less enlightening.)

Micah
  • 36,226
  • 15
  • 79
  • 126