How to make counters for irregular integral pattern?

I can easily make counter for consecutive numbers. But for patterns, described in below question, I'm quite unsure about my approach.

Question - We want to design a synchronous counter that counts the sequence $$0−1−0−2−0−3$$ and then repeats. The minimum number of $$J-K$$ flip-flops required to implement this counter is _____________ ?

My approach - Make counter using 3 flip flops using some gates. The counting sequence $$(ABC)$$ would be $$000, 001, 100, 010, 110, 011$$ and at any state if $$Y = A'B'C' + AC'$$ is true output $$0$$, else output the current state value.

Is this approach correct? If it's not, what's the correct approach to make counters for this kind of irregular patterns?

• This feels like a programming question to me. Community votes, please: offtopic? – Raphael Oct 29 '18 at 13:31
• How programming question? @Raphael :O ... It's straight question - how to make counters for irregular patterns. If you are taking this question an analogy with a programming question, then you may be wrong. – Mr. Sigma. Oct 29 '18 at 15:16