Show that there are 21 consecutive composite four-digit numbers.
Solution
The obvious solution, if we did not care about the bound, is something like . Then, is divisible by for . However, is far too large.
Instead, we take to have several small prime factors in order that has small factors for most values of , and we then tweak to take care of missing factors. We want a small so we have to try to be efficient: small factors, and factors that handle several values of , are best.
It makes sense to start with taking to be a multiple of both and , since these factors are small, and together they handle all values of except .
We next assume that since this is more efficient than assuming that is a multiple of : the former handles two of the remaining values of (namely and ), whereas the latter handles only . This leaves to be handled. For a similar reason, we assume that in order to handle and , leaving only . Finally, we assume that is a multiple of and of to handle these two values of .
Thus, is a multiple of . Note that equals , as desired. Thus, we need to differ from by a multiple of . Now, , and , so is what we need.
Clearly, has at least four digits, so it remains to check that is at most . In fact, it is easier to compare with . It is clear that , while , so we are done.