Earlier quoted context omitted.
Choose prime numbers for the duration of those gifs and they will never close at the same time :)
Think this one through. d₁ = 3, d₂ = 5 What happens at t = 15?
That makes sense. My bad. I think with coprime numbers it works as I intended.