Answer:
2a) friend Y
2b) modulo calculations, state machines
Step-by-step explanation:
After 4 days, history repeats itself. If you work out the first few days of the visiting pattern, you find that day 5 is identical to day 1.
So, if you divide the day number by 4 and take the remainder (i.e., the modulus), you get the original day number (where day 0 == day 4).
206 modulo 4 is 2, i.e., the second day where friend Y is visited.
The system behaves like a state machine with only 4 states.