How does one find all integer solutions to this equation: $$ \biggl\lfloor{\frac{x}{1!}\biggr\rfloor} + \biggl\lfloor{\frac{x}{2!}\biggr\rfloor} + \cdots +\biggl\lfloor{\frac{x}{10!}\biggr\rfloor}=1001$$

Can't think about methods for solving this. Though i did something i am not sure of it.

  • $\begingroup$ I suppose you want analytical methods? It should be easy by using a computer since $x<1001$ from considering the first term. This can be continued... $\endgroup$ – picakhu Feb 4 '11 at 0:58

I noticed that $x=6!$ is too big. So the solution solves:

$$\biggl\lfloor{\frac{x}{1!}\biggr\rfloor} + \biggl\lfloor{\frac{x}{2!}\biggr\rfloor} + \cdots \biggl\lfloor{\frac{x}{5!}\biggr\rfloor}=1001.$$

Then I divided $\frac{1}{1!} + \frac{1}{2!} + \frac{1}{3!} +\frac{1}{4!} + \frac{1}{5!}$ into $1001$ and got $583.107$. Trying $584$ in the equation works. Any integer larger or smaller will not solve the equation, but $584 \leq x < 585$.


The left hand side is strictly less than $(e-1)x$ and so you can start testing at $x=\biggl\lceil{\dfrac{1001}{e-1}}\biggr\rceil = 583$ and continue until you get a sum larger than 1001, something which will happened very quickly; in this particular case $x=585$ produces a sum which is too large.

  • $\begingroup$ Does "the left hand side is strictly less than (e - 1)x" come from a well-known result? $\endgroup$ – The Chaz 2.0 Apr 19 '11 at 4:48
  • $\begingroup$ It comes from $e = \frac{1}{0!}+\frac{1}{1!}+\frac{1}{2!}+\frac{1}{3!}+\frac{1}{4!}+\cdots$, and then subtract the first term, multiply by $x$ and then round each term down. $\endgroup$ – Henry Apr 19 '11 at 7:53

We are given $\lfloor x/1!\rfloor + \lfloor x/2! \rfloor + \dots + \lfloor x/10!\rfloor = 1001$.


$$\begin{align} \lfloor x/1!\rfloor \leq 1001 &\Longrightarrow x \leq 1001 \\ &\Longrightarrow x/7! \leq 1001/7! \\ &\Longrightarrow x/7! \leq 1001/5040 \\ &\Longrightarrow \lfloor x/7! \rfloor = 0 \\ &\Longrightarrow \lfloor x/k! \rfloor = 0, \quad\text{ for } k \in\{ 7,8,9,10 \} \end{align}$$

It suffices to solve $\lfloor x/1! \rfloor + \dots + \lfloor x/6! \rfloor = 1001$. Since $y - 1 < \lfloor y \rfloor \leq y$, we have

$$\begin{align} x(1/1! + \dots 1/6!) - 6 < \lfloor x/1!\rfloor + \dots + \lfloor x/6! \rfloor \leq x(1/1! + \dots + 1/6!) \end{align}$$

and thus $582.635 \leq x < 585.546$. Among the integers $583, 584$, and $585$, the integer $584$ satisfies the equation.

  • $\begingroup$ Oh, my. (several more characters) $\endgroup$ – Tyler Apr 19 '11 at 4:23
  • $\begingroup$ @Tyler: No kidding! $\endgroup$ – The Chaz 2.0 Apr 19 '11 at 4:47

Every non-negative integer can be written (uniquely) in the form


where $0\le a_k\le k$. It's easy to show that

$$\big\lfloor {x\over1}\big\rfloor+\big\lfloor {x\over2}\big\rfloor+\big\lfloor {x\over6}\big\rfloor+\big\lfloor {x\over24}\big\rfloor+\cdots=a_1+3a_2+10a_3+41a_4+206a_5+1237a_6+\cdots$$

where the sequence of coefficients $c_k=1,3,10,41,206,1237,\ldots$ satisfies the recursion $c_k=kc_{k-1}+1$. If $1001$ can be represented by such a sum, we must have $a_k=0$ for $k\ge6$, leaving

$$\begin{align} a_5&=\big\lfloor{1001\over206}\big\rfloor=4\\ \\ a_4&=\big\lfloor{1001-4\cdot206\over41}\big\rfloor=\big\lfloor{177\over41}\big\rfloor=4\\ \\ a_3&=\big\lfloor{177-4\cdot41\over10}\big\rfloor=\big\lfloor{13\over10}\big\rfloor=1\\ \\ a_2&=\big\lfloor{13-10\cdot1\over3}\big\rfloor=\big\lfloor{3\over3}\big\rfloor=1\\ \\ a_1&=0 \end{align}$$

This gives


as others have found.

Remark: The restriction $0\le a_k\le k$ makes it clear that not every number $N$ can be written in the form $\big\lfloor {x\over1}\big\rfloor+\big\lfloor {x\over2}\big\rfloor+\big\lfloor {x\over6}\big\rfloor+\big\lfloor {x\over24}\big\rfloor+\cdots$ (with integer $x$). The sequence of numbers that can be so written is A060832 in the OEIS. As it happens, $N=1001$, as we just saw, is such a number, but $N=1000$ is not.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy