I'm following a Combinatorics course at the moment, and have recent proved the Erdős–Szekeres Theorem (or, at least, some variation of):
A sequence of length $n^2 + 1$ either contains an increasing subsequence of length $n+1$, or a decreasing one of length $n+1$.
I have been set an exercise to prove the following:
For each natural number $n$, find a sequence of $n^2$ real numbers which contains no monotonic subsequence of more than $n$ terms.
I can naively / informally how to do this, but no method which would seem to involve any sort of Graph / Ramsey Theory. I'm assuming that I'll have to use Erdős–Szekeres, since I'm in a Combinatorics course, or notice something about its proof, to come up with a formal construction of the sequence, but can't see how I'd go about it.
Would using Erdős–Szekeres be the right way to go about this, or is there a different / simpler combinatorial way to explore?
Thanks!