In 1, 2, 3, 4 Of the 1000 numbers, 999 and 1000, how many numbers can't be divisible by 2 or 3?

In 1, 2, 3, 4 Of the 1000 numbers, 999 and 1000, how many numbers can't be divisible by 2 or 3?


There are 500 divisible by two
333 are divided by three
166 are divided by 6
Inclusion exclusion principle
1000-500-333+166=333



Can 999 be divided by 998? Can 999 be divided by 999 and 1000? Why?
The title of "the golden coach"


999^3 - 999
= (999^2 - 1)999
= (999 + 1)(999 - 1)999
= 998*999*1000
So, the cube of 999 - 999 can be divisible by 998, as well as 999 and 1000



What are the integers in the statistical interval [10009999] where the sum of thousand digits and individual digits is 7


1006~1996
2005~2995
3004~3994
4003~4993
5002~5992
6001~6991
7000~7990
There are 700 such integers