You are hosting a party and do not have room to invite all of your friends. You use the following unemotional mathematical method to determine which friends to invite.
Number your friends 1,2,…,K1,2,…,K and place them in a list in this order. Then perform mm rounds. In each round, use a number to determine which friends to remove from the ordered list.
The rounds will use numbers r1,r2,…,rmr1,r2,…,rm. In round ii remove all the remaining people in positions that are multiples of riri (that is, ri,2ri,3ri,…ri,2ri,3ri,…) The beginning of the list is position 11.
Output the numbers of the friends that remain after this removal process.
10
2
2
3
1
3
7
9