The Surprising Mathematics of Longest Increasing Subsequences