In a $365$-day year, Joe, Greg & Dean visit the park multiple times for a walk.
- Joe visits every $3$rd day
- Greg visits every $5$th day
- Dean visits every $7$th day
- All three visit the park on the first day of the year
In the year:
- On how many days is Greg alone in the park?
- On how many days will Dean meet Joe?
- On how many days will all three meet?
I can work this out brute force by laying down the multiples of $3,5,7$ from $1$ to $365$. I'm looking for an efficient way of formalizing the calculation step by step. What'd be the best way?