[Math] How many numbers are there less than $n$ such that they are divisible by all numbers from 2 to 10

number theory

I'm solving one task that requires from me to count how many numbers are there less than $n$, such that $n$ can go up to $10^{18}$ and they should be evenly divisible by all numbers from 2 to 10.

I have given example if $n=3000$ then the answer is $1$, can someone help me find this numbers which is less than 3000 and is evenly divisible by $2,3,4,5,6,7,8,9,10$.

Here is my idea: If the number should be divisible by 10 that means that it should end on $0$, since it ends on $0$ it's also divisible by $2$. To make it divisible by $4$ the last two digits should be divisible by $4$. So the last two digits from the number should be $00, 20, 40, 60, 80,$. I don't know how to continue this with other numbers.
Edit: We know that if last three digits from number are divisible by 8 then the whole number is so we know that the number should end on $000,200,400,600,800$ or $120,320,520,720,920$, $240, 440, 640, 840$, $160,360,560,760,960$, $280, 480,680,880$ to fill the conditions.
Please give me some hint for other numbers. Thanks in advance.

Best Answer

If a number is divisible by the integers from $2$ to $10$, it must in particular be divisible by minimum common multiple of these numbers. (In fact, this condition is an equivalent one to the first). A simple calculation yields:

$$\text{mcm}(2,3,\ldots,10)=2520$$

It's easy to see then that the number of integers less than $n$ that are divisible by all of these integers is

$$\left\lfloor \frac{n}{2520} \right\rfloor$$