I'm looking for the longest ordered subsequences of integer pairs with specific incremental constraints. In these examples, I'd like the last value of each pair to be 1 less than the first value of the next pair. So far I've not discovered what pattern to specify.
Example 1.
LongestOrderedSequence[{{4, 5}, {7, 8}, {11, 12}, {13, 14}, {15, 16},
{65, 66}}, (#2[[1]] - #1[[2]] == 1) &]
{{4, 5}}
I was hoping for
{{11, 12}, {13, 14}, {15, 16}}
Example 2.
LongestOrderedSequence[{{2, 4}, {6, 8}, {9, 11}, {12, 14},
{98, 100}}, (#2[[1]] - #1[[2]] == 1) &]
{{2, 4}}
I was hoping for
{{6, 8}, {9, 11}, {12, 14}}