Let us consider permutations $\pi$ on $\{1,\dots,n\}$ as sequences $\pi(1),\pi(2),\dots,\pi(n)$. For a permutation $\pi$ let $R(\pi)$ be the ternary relation with $(x,y,z)\in R(\pi)$ whenever element $y$ appears in between $x$ and $z$ (i.e., x is left of y and z is right of y, or, x is right of y and z is left of y). So $(x,y,z)\in R(\pi)$ iff $(z,y,x)\in R$.
My question is: For permutations of length $n$, what is the smallest number $f(n)\ge 1$ such that there exist permutations $\pi_1,\dots,\pi_{f(n)}$ with $R(\pi_1)\cap R(\pi_2)\cap \dots \cap R(\pi_{f(n)})=\emptyset$? Are there exact results or bounds known describing this sequence?
Examples: For n=2, $f(n)=1$ since $R(\pi)=\emptyset$ for all permutations $\pi$ of length 2. For n>2, $f(n)$ has to be larger than 1 because $R(\pi)$ is only empty if $n\le2$.
For n=3, we can take the permutations $\pi_1=123$ and $\pi_2=132$. Here $R(\pi_1)=\{(1,2,3),(3,2,1)\}$ and $R(\pi_2)=\{(1,3,2),(2,3,1)\}$. Thus $R(\pi_1)\cap R(\pi_2)=\emptyset$ and $f(3)=2$.
For n=4, the permutations $\pi_1=1234$ and $\pi_2=2143$ show that $f(4)=2$.
For n=5, $f(n)\ge 3$. This is not hard to see but requires a few case distinctions.
With support of computer calculation we managed to establish that $f(n)=3$ for $n\in\{5,\dots,16\}$ and $f(n)>3$ for $n>16$.