By using each of the digits from the set, {1, 2, 3, 4}, exactly once, and making use of the four arithmetic operations (+, −, *, /) and brackets/parentheses, it is possible to form different positive integer targets.
Using the set, {1, 2, 3, 4}, it is possible to obtain thirty-one different target numbers of which 36 is the maximum, and each of the numbers 1 to 28 can be obtained before encountering the first non-expressible number.
Find the set of four distinct digits, <var>a</var><<var>b</var><<var>c</var><<var>d</var>, for which the longest set of consecutive positive integers, 1 to <var>n</var>, can be obtained, giving your answer as a string: <var>abcd</var>.