TITLE: Why do these days of the week line up?
QUESTION [29 upvotes]: I go to the gym every Mon/Wed/Fri while a friend of mine goes every 3 days regardless of the day. A typical two weeks could look like:
     Su | M | T | W | R | F | Sa | Su | M | T | W | R | F | Sa
 ME:      X       X       X             X       X       X
HIM:          X           X             X           X

To my surprise, I've observed that I see him exactly once a week. I decided to look at it from a math perspective.
It's clear the number of times a week I see him has an upper bound of 1. If I see him Mon, he'll come in Thurs and I won't see him Wed/Fri. The same logic can be used for if I see him Wed/Fri.
However, I'm not sure why the lower bound here is 1. My intuition tells me it has something to do with modulus 7, since the days he comes to the gym are cyclical (this would also make some kind of sense since I'm coming to the gym every two days 3 times while he comes every 3 days and his cycle repeats every 3 weeks) but I can't make the mathematical leap.
I also tried to generalize. What if I come in for 3 days that are each 1 apart? Then it's obvious I'll see him exactly once. But what if I come in 3 days that are each 4 days apart?
I can bruteforce this to find that I'm right, but intuitively, why are our days lining up exactly once a week?

REPLY [3 votes]: Your pattern would repeat every 2 days if you didn't include Sunday. Looking at the six days from Monday to Saturday, your pattern is:
X-X-X- (1, 3, 5)

which is all the odd numbers, if Monday is day 1.
Your friend goes every 3 days and his pattern shifts compared to yours:
X--X-- (1, 4)
-X--X- (2, 5)
--X--X (3, 6)

Only one of his days will be odd, the other will be even for the six overlapping days. That's why it will always be one day per week you will be at the gym on the same day.