In reply to bsivakumar:
The title question does not match the requirements in the body of your post. Can you clarify. Also, be “repeat” do you mean consecutively, or within a cycle of values?
Can you give some examples of expected values that would meet the constraints?