For example
Not Accepted values: $4444$ (4444 is not a "pair"), $4040$, $4141$, $4440$ (444 is not a "pair").
Accepted values: $4400, 4401, 0440, 4404, 4004$
Digits may be $0-9$, not just 4 and 0 etc..
So far I've got ($1 - 10P4 - 10 $) which is (All - no repeating digits - all digits are the same). I've no idea how to go on with the other conditions. Perhaps my approach is wrong?