Let us define
$f(x) = \lfloor \frac{x}{1!}\rfloor + \lfloor \frac{x}{2!}\rfloor +\cdots + \lfloor \frac{x}{10!}\rfloor $
So we have
$f(x) > \lfloor \frac{x}{1!}\rfloor $ for $x>=2$
as $f(x) = 1001$ so
$x < 1001$
As $7!>1000$ so we have $\lfloor \frac{x}{n!}\rfloor =0 $ for $x< 1000$ and $n>6$
Further
$f(kn!+i)= kf(n!) + f(i)\cdots(1)$ for k = 1 to n and i is less than n!
This is so because for m < n
$\lfloor \frac{kn!+l}{m!} \rfloor = \lfloor\frac{kn!}{m!}\rfloor + \lfloor \frac{l}{m!} \rfloor $
additionally
$f(kn!+i)= f(kn!) + f(i)\cdots(2)$ for any $k$ and $ i \le n!\cdots(2)$
and $f((n+1)!) = (n+1)f(n!) + 1$
to use the facts let us calculate f(k!) for k = 1 to 6.
f(1) = 1, f(2) = 3, f(6) = 10, f(24) = 41, f(120) = 206
and f(720) = 1237
so the value of x is less than 720 so let us look at next lowest factorial that is 120
f(120) = 206
$\lfloor \frac{1000}{206}\rfloor = 4$
using (1) $f(120*4) = 206 * 4 = 824$
Or f(480) = 824
So we have to account for 1001 - 824 = 177
now f(24) = 41
$\lfloor \frac{177}{41}\rfloor = 4$
so we f(96) = 41 * 4 = 164
so $f(576) = f(480+96) = f(120 * 4 + 96)
= f(480) + f(96) = 824 + 164 = 988$
Now we have to account for remaining 13 and f(3!) = f(6) = 10
so 6 goes one more time and we ahve
$f(582) = f(576 + 6) = f(24 * 24 + 6) = f(576) + f(6) = 988 + 10 = 998$ using (2)
now we need to account for 3 and as f(2!) = f(2) =3 so we get
E$f(584) = f(582+2) = f(97 * 6) + 2 = f(682) + f(2) = 988 + 3 = 1001$
so x = 584
No comments:
Post a Comment