MathDB
2017 CNMO Grade 11 P8

Source: 2017 China Northern MO, Grade 11, Problem 8

February 24, 2020
number theoryprime numbers

Problem Statement

On Qingqing Grassland, there are 7 sheep numberd 1,2,3,4,5,6,71,2,3,4,5,6,7 and 2017 wolves numberd 1,2,,20171,2,\cdots,2017. We have such strange rules: (1) Define P(n)P(n): the number of prime numbers that are smaller than nn. Only when P(i)j(mod7)P(i)\equiv j\pmod7, wolf ii may eat sheep jj (he can also choose not to eat the sheep). (2) If wolf ii eat sheep jj, he will immediately turn into sheep jj. (3) If a wolf can make sure not to be eaten, he really wants to experience life as a sheep. Assume that all wolves are very smart, then how many wolves will remain in the end?