Solution (source code)

= Solution

<Ramsey theorem> follows from $R(s,t)\le R(s-1,t)+R(s,t-1)$: at a vertex, either at least $R(s-1,t)$ neighbours or at least $R(s,t-1)$ non-neighbours produce the desired clique or independent set. Induction with $R(2,t)=R(s,2)=t$ gives $R(s,t)\le\binom{s+t-2}{s-1}$, hence $R(t)\le\binom{2t-2}{t-1}<2^{2t}$.