I have a question about Erdős–Szekeres:
Erdős–Szekeres theorem – if there is a sequence of $n^2+1$ numbers, then there is either a monotonic rising subsequence of $n+1$ numbers or a monotonic descending subsequence of $n+1$ numbers.
(I realize that the general form is $ab$ instead of $n^2$ but that is how I was taught and for the sake of this question, it’s the same thing).
What I want to know is, is this theorem sharp? In other words, is it possible to find a sequence of $n^2$ numbers that does not have a monotonic subsequence of $n+1$ numbers for all $n \in \mathbb N$?
Any subsequence of $6$ of these numbers must contain two numbers from the same block and two numbers from different blocks. Two numbers from the same block must appear in decreasing order, while two from different blocks must appear in increasing order. Thus, the subsequence cannot be monotonic.
The construction clearly generalizes to arbitrary $n$.