> prevents passcodes with ascending or descending numbers adjacent to each other
That's just silly. Assuming it also disallows duplicates next to one another, that means that there is only 7 valid digits for position 2 through 4, aka 10 * 7 * 7 * 7 = 3730 possible combinations, less than half the search space.