I thought that was an initial requirement.Just for grins, here's my circuit modified to always include the first A1 pulse after A2 goes high.
I think using both halves of the 4013 lets the circuit be done with only two physical packages, but the XOR is a very cool move.
ak

