Although  we have by now a precise answer, I'd like to keep the summer mood of the question and play a little more with it by an elementary arithmetic approach.

The solution I wish to sell is good for any $n$, and (just in case your favorite classic radio station entrusts you with the organization of the schedule of the year, which I think would be a finest choice) includes the issues: what piece $f(t)$ will be played at time $t$, and conversely, at what time $h(x,y)$ the piece  $x$ is to be played and followed  by piece $y$.
  


Consider the functions $(f,g):\mathbb{N}\to\mathbb N\times\mathbb N$ and $h:\mathbb N\times\mathbb{N}\to\mathbb N$ defind by
$$  f(t):=\cases{ \frac{t-\lfloor\sqrt t\rfloor^2}2 &if $\; t-\lfloor\sqrt t\rfloor^2$ is even\\ \\ \lfloor\sqrt t\rfloor &if $ \;t-\lfloor\sqrt t\rfloor^2$ is odd}\qquad\qquad g(t):=f(t+1),$$  and
$$h(x,y):=\cases{x^2+2x&if $\;y=0 ,$\\\\y^2+2x&if $\;0\le x <y,$\\\\ x^2+2y-1&if $\;0< y \le x $.}$$


Needless to say, $(f,g)$ and $h$ are bijective, in fact inverses of each other, which is elementary (and quite exiting) to check. Moreover (keeping your ordinal notation), they subordinate a bijection $n^2\to n\times n$  for any $n\in\mathbb N$: in other words, $n^2\ni t\mapsto (f(t),f(t+1))\in n\times n$ is injective, which  exactly means "$f$ is radio-playing", and  realizes the maximum cardinality $A_n$ wrto $n$ (there can not be an injective function $m\to n\times n$ for $m>n^2$, as you observed).