# Greatest integer function

#### jacks

##### Well-known member
Calculate Natural no. $n$ for which $\displaystyle [\frac{n}{1!}]+[\frac{n}{2!}]+[\frac{n}{3!}]+...........+[\frac{n}{10!}] = 2012$

where $[x] =$ Greatest Integer function

#### Evgeny.Makarov

##### Well-known member
MHB Math Scholar
The function $f(n)=\left\lfloor\dfrac{n}{1!}\right\rfloor+\dots+\left\lfloor\dfrac{n}{10!}\right\rfloor$ is non-decreasing and f(1000) < 2012 < f(2000). Since $2000-1000<2^{10}$, you can find n for which f(n) = 2012 in 10 iterations using binary search, or bisection method.