How to design a clock divide-by-3 circuit with 50% duty cycle?

3This content is from the following blog:

The basic insight was to notice that if you are doing a divide by 3 and want to keep the duty cycle at 50% you have to use the falling edge of the clock as well.

The trick is how to come up with a minimal design, implementing as little as possible flip-flops, logic and guaranteeing glitch free divided clock.