Constraint for repeating numbers in an array in a unique pattern

In reply to kernalmode1:
Note that both my and your example meet the same requirements.