## Consecutive First/Last Digits In Any Order

This filter accepts tickets that have the desired count of first/last digits that are consecutive regardless of their order.

Each pool number breaks down into two
digits. The *first digit *is the leading digit of the number, the *last
digit *is the second digit of the number. For example the first digit of number
23 is 2, the last digit of that number is 3. The first digit of number
9 is 0, the last digit of that number is 9.

Digits are consecutive if each digit is one higher than the
preceding digit. For example digits *5,6,7* are consecutive, digits *5,7,9* aren't consecutive.

### Example

- When filter settings are
*The count of any-order consecutive last digits is 6 to 6* then:
- 16-23-24-35-42-47 - filter accepts this ticket because its last digits are 6, 3, 4, 5, 2, 7. When sorted in ascending order the last digits form a sequence of six consecutive digits: 2-3-4-5-6-7.
- 07-12-16-26-27-35 - filter rejects this ticket because its last digits are 7, 2, 6, 6, 7, 5. Sorted in ascending order the digits are 2,5,6,6,7,7. The longest consecutive sequence is only three digits: 5-6-7.

- When filter settings are
*The count of any-order consecutive last digits is 2 to 2* then:
- 11-14-20-26-27-33 - filter accepts this ticket because its last digits are 1, 4, 0, 6, 7, 3. After sorting in ascending order we can see that at most two digits are consecutive: 0, 1, 3, 4, 6, 7.
- 09-10-11-12-15-33 - filter rejects this ticket because its last digits are 9, 0, 1, 2, 5, 3. After sorting in ascending order: 0, 1, 2, 3, 5, 9 we can see there is a sequence of four consecutive digits: 0-1-2-3.

See also Consecutive First/Last Digits In Any Order statistics and Consecutive Digits ticket filter.