# How distributive are the bad Laver tables?

Suppose that $n\in\omega\setminus\{0\}$. Then define $(S_{n},*)$ to be the algebra where $S_{n}=\{1,…,n\}$ and $*$ is the unique operation on $S_{n}$ where

1. $n*x=x$

2. $x*1=x+1\,\text{mod}\, n$ and

3. if $y<n$, then $x*(y+1)=(x*y)*(x*1)$.

The algebra $(S_{n},*)$ satisfies the self-distributivity law $x*(y*z)=(x*y)*(x*z)$ if and only if $n$ is a power of $2$, and if $n$ is a power of $2$, then the algebra $(S_{n},*)$ is called a Laver table.

If $n$ is not a power of 2, then one would still expect the algebra $(S_{n},*)$ to have a certain amount of self-distributivity and a computer verification shows that in $S_{n}$ we have $x*(y*z)=(x*y)*(x*z)$ for many triples $(x,y,z)$.

Define $f(n)=\frac{1}{n^{3}}\cdot|\{(x,y,z)\in\{1,…,n\}^{3}:S_{n}\models x*(y*z)=(x*y)*(x*z)\}|$ for each positive integer $n$.

Let $\ell=\liminf_{n\in\omega}f(n)$. Let $\mathfrak{m}=\liminf_{n\in\omega}\frac{1}{n}(f(1)+…+f(n))$. Then is $\ell=0$? If not, then can one give an explicit value of $\ell$?
What is the value of $\mathfrak{m}$? Does $\mathfrak{m}=\lim_{n\in\omega}\frac{1}{n}(f(1)+…+f(n))$? Is $\mathfrak{m}=\frac{1}{2}$? Is there a proof that for all natural numbers $n$, we have $\liminf_{m\in\omega}f(n2^{m})=1$?

The first few values of $f(n)$ are 1., 1., 0.851852, 1., 0.696, 0.856481, 0.612245, 1., 0.615912, 0.713, 0.489106, 0.930556, 0.516158, 0.715015.