TITLE: Ternary associative multiplication
QUESTION [9 upvotes]: In this answer Brian M. Scott describes the following generalization of a binary associative multiplication to a ternary one: it is a function $$[\cdot,\cdot,\cdot] : G\times G \times G \to G$$ such that $$[[a,b,c],d,e] = [a, [b,d,e], [c,d,e]]$$ The reasoning is roughly that for ordinary binary associativity we have a left multiplication function $a:G \mapsto f_a : G \to G$, such that $f_a \circ f_b = f_{f_a(b)}$, while for a ternary associative operation we have a "left multiplication" $a:G \mapsto f_a: G \times G \to G$ such that $$f_a \circ (f_b, f_c) = f_{f_a (b,c)}$$
It may also probably make sense to demand different symmetrizations of this relation, like $$[a,b,[c,d,e]] = [[a,b,c],[a,b,d],e]$$ and I'm also no entirely sure if the arguments on the right are correct, so we could consider various relations of the form $$[[a,b,c],d,e] = [a, [b,d,?], [c,?,e]]$$ The reasoning here is that if we would try to define "ternary algebras", then it would make sense to have all relations given by polylinear operations (which isn't true in the example above). I believe a natural generalization to finite-dimensional ternary algebras should have relations of the form $$[[a,b,c],d,e] = \frac{1}{\mathrm{dim}}\mathrm{Tr}_w [a, [b,d,w], [c,w,e]]$$ An example of such a ternary algebra would be the space of rank 3 tensors $a_{ijk}$ with the bracket given by $$[a,b,c]_{ijk} = \sum_{pqs} a_{piq} b_{qjs} c_{skp}$$ Thus it is possible that in the case of ternary groups there should also be some averaging over all elements in place of $?$.
My question is: have such structures been studied? If so, then what are their names and relevant references? Searching on the google for "ternary operations" or "ternary algebras" doesn't yield any useful results.
EDIT: I am not asking about ternary multiplications in general, most references that I found focus on a very naive approach which is equivalent to a binary associative multiplication in most interesting cases and isn't very far in general. I am interested specifically in the associativity condition of signature $[-, -, [ -, -, -]] = [[-,-,-], [-,-,-],- ]$, which has 2 multiplications on the left, but 3 on the right. Most articles discuss signatures of the form $[-,-,[-,-,-]] = [[-,-,-],-,-]$.
One can also try to generalize the above definitions to $n$-ary algebras for arbitrary $n$, but the precise relations are even less clear.

REPLY [10 votes]: Perhaps this has already been said in some form, but the identity
$$[[a,b,c],d,e] = [a, [b,d,e], [c,d,e]]$$
is exactly the $(2,2,2)$-associative law of clone theory. I think that this is the most natural way this identity arises.
A clone is a closed set of operations. Starting with a collection of finitary operations on some set, close them under composition, group them together according to their arity, and one obtains a multisorted structure called a clone: $\langle C_1, C_2, \ldots; \{\textrm{comp}_n^m\}, \{p^m_i\}\rangle$ where $C_i$ is the set of $i$-ary operations in the collection, $\textrm{comp}_n^m$ is a composition operation that applies an element of $C_m$ to $m$ elements of $C_n$ to obtain an element of $C_n$. (For example, if $f(x,y)\in C_2$ and $g_1(x,y,z), g_2(x,y,z)\in C_3$, then $\textrm{comp}^2_3(f,g_1,g_2)=f(g_1(x,y,z),g_2(x,y,z))=f(g_1,g_2)(x,y,z)\in C_3$.)
There is a Cayley representation theorem for clones, starting from axioms
that are similar to the axioms for monoids: axioms of the identity and axioms of associativity. The $(m,n,k)$-associative law is
$$
[[f,g_1,\ldots,g_m],h_1,\ldots,h_n]=[f,[g_1,h_1,\ldots,h_n],\ldots,[g_m,h_1,\ldots,h_n]],
$$
where $f\in C_m, g_i\in C_n, h_j\in C_k$ and $[f,g_1,\ldots,g_m]$ denotes $f(g_1,\ldots,g_m)$.
As I said above, the identity of this question is the $(2,2,2)$-associative law.
The Cayley representation is sufficient to show that models of
$$[[a,b,c],d,e] = [a, [b,d,e], [c,d,e]]$$
are exactly those structures that are isomorphic to binary components of clones
under the operation of $\text{comp}_2^2(f,g,h)=:[f,g,h]$ PROVIDED you have the identity elements to complete the Cayley proof. These identity elements are the elements $p_1^2(x,y)=x$ and $p_2^2(x,y)=y$. So, if you have any structure with a ternary operation $[f,g,h]$ satisfying the identity of this problem, and you also have ``constants'' $p_1^2$ and $p_2^2$ such that the (universally quantified) identities $[p_1^2,f,g]=f$, $[p_2^2,f,g]=g$, and $[h,p_1^2,p_2^2]=h$ hold, then your structure is isomorphic to the binary component of some clone of finitary operations on some set.

You can read about clones on the wikipedia page for clones, linked above. The $(m,n,k)$-associative law is the 6th bullet point in the subsection ``Abstract clones''. You might also examine 
W. Taylor, 
Characterizing Mal’cev conditions, 
Algebra Universalis 3 (1973), 351-397.