After many years of "No shave New Years resolutions," Mursalin finally decides to shave his magnificent mustache of 2014 hairs. Each hair is randomly assigned a number from 1 to 2014 such that no two have the same number.
However, he just so happens to have a magical razor with an infinite amount of blades. Each blade is assigned a number from 1 to such that each blade cuts every hair which is a multiple of that razor's number. The first blade is defective and only cuts the first hair then breaks.
What is the number on the blade that cuts the last hair?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The problem is equivalent to Erastothenes' sieve, and thus it looks for the greatest prime below 2014. A quick check shows that 2011 is the prime we need.