Suppose one were to define a group-like structure based on a set $G$
with a ternary (rather than binary) operator $g( a, b, c ) = \left< a, b, c \right>$.
One possible definition for the associative law is that
$$
\left< \left< a, b, c \right>, d, e \right>
=
\left< a,\left< b, c, d \right>, e \right>
=
\left< a, b, \left< c, d, e \right> \right>
\;.
$$
Is there some algebraic structure defined along these lines that
has been investigated?
If so, I'd appreciate a name & pointer.


Are there other natural definitions of ternary associativity? 
And definitions of ternary identity laws?


(Not entirely relevant, but I came upon this thinking about medians and centroids,
and I am just looking for possible models...)



Natural associative law for a ternary "group"?
What you need is the keyword "polyadic groups". A polyadic group is a non-empty set $G$ equipped with an associative $n$-ary operation $f:G^n\to G$ such that for all $a\_1, \ldots, a\_{n}$ and $b\in G$, the equations 
$$f(a\_1, \ldots, a\_{i-1}, x, a\_{i+1}, \ldots, a\_n)=b, (1\leq i\leq n)$$
have (unique) solution for $x$. The simplest examples are polyadic groups derived from ordinary groups: Let $(G, \cdot)$ be a group and define an $n$-ary operation on $G$ by 
$$f(x\_1, \ldots, x\_n)=x\_1x\_2\cdots x\_n.$$
Then $(G,f)$ becomes a polyadic group which is called the polyadic group derived from $(G, \cdot)$ and it is denoted by $\mathrm{der}(G, \cdot)$. It is easy to see that only polyadic groups of this type have *identity* element. In general, the structure of a polyadic group can be described in terms of ordinary groups and their automorphisms. If $(G, f)$ is a polyadic group, then there exists a binary operation $\ast$ on $G$ such that $(G, \ast)$ is a group, and there is an automorphism $\theta\in \mathrm{Aut}(G, \ast)$ and an element $b\in G$ such that $\theta^{n-1}(x)=bxb^{-1}$ and $\theta(b)=b$ and 
$$f(x\_1, \ldots, x\_n)=x\_1\ast\theta(x\_2)\ast\cdots \ast\theta^{n-1}(x\_n)\ast b$$
and the converse is also true. So, the polyadic group is denoted in general by $\mathrm{der}\_{b, \theta}(G, \ast)$.


Many problems concerning polyadic groups are solved until now; Emil Post proved that any polyadic group $(G, f)$ has a covering group $G^{\ast}$ which is generated by $G$ and inside $G^{\ast}$ we have 
$$f(x\_1, \ldots, x\_n)=x\_1x\_2\ldots x\_n$$. Moreover $G^{\ast}$ contains the *retract group* of $(G, f)$ as a normal subgroup and the corresponding quotient is cyclic of order $n-1$. Here is a list of some interesting works done for polyadic groups and you can find appropriate references using keywords in the internet.


1- The variety of polyadic groups and its subvarieties is studied by Dudek, Artamonov, and ... .


2- The universal Post cover and retracts are studied by Michalisky and Dudek.


3- Free polyadic groups are studied by Artamonov.


4- Representation theory of polyadic groups are studied by me and Dudek. 


5- The structure of homomorphisms, automorphisms, and an isomorphism problem for polyadic groups, studied by me and Khodabandeh.


6- Simple polyadic groups are characterized by me and Khodabandeh. 


Similar structures are also studied during the past decades, among them are $n$-ary generalization of Lie algebras (Fillipov algebras) and $(m,n)$-rings. Here is a list of some useful references:\ 


1. Dudek W. A. Remarks on n-groups // Demonstr. Math. 1980. V. 13. P. 165–181.
2. Post E. L. Polyadic groups // Trans. Amer. Math. Soc. 1940. V. 48. P. 208–350.
3. Dornte W. Unterschungen ¨uber einen verallgemeinerten Gruppenbegriff // Math. Z. 1929.
Bd 29. S. 1–19.
4. Kasner E. An extension of the group concept // Bull. Amer. Math. Soc. 1904. V. 10. P. 290–291.
5. Galmak A. M. N-ary groups. Gomel: Gomel Univ. Press, 2003.
6. Dudek W. A. Varieties of polyadic groups // Filomat. 1995. V. 9. P. 657–674.
7. Galmak A. M. Remarks on polyadic groups // Quasigroups Relat. Syst. 2000. V. 7. P. 67–70.
8. Gleichgewicht B., Glazek K. Remarks on n-groups as abstract algebras // Colloq. Math. 1967. V. 17. P. 209–219.
9. Dudek W. A., Michalski J. On retract of polyadic groups // Demonstr. Math. 1984. V. 17.
P. 281–301.
10. Dudek W. A., Glazek K. Around the Hossz´u–Gluskin theorem for n-ary groups // Discrete
Math. 2008. V. 308. P. 4861–4876.
11. Dudek W. A., Michalski J. On a generalization of Hossz´u theorem // Demonstr. Math. 1982. V. 15. P. 437–441.
12. Hosszu M. On the explicit form of n-groups // Publ. Math. 1963. V. 10. P. 88–92.
13. Ushan J. Congruences of n-group and of associated Hossz´u–Gluskin algebras // Novi Sad. J. Math. 1998. V. 28. P. 91–108.
14. Dudek W. A., Shahryari M. Representation theory of polyadic groups // Algebr. Represent. Theory. 2012. V. 15. P. 29–51.
15. Shahryari M. Representations of finite polyadic groups // Commun. Algebra. 2012. V. 40.
P. 1625–1631.
16. Khodabandeh H., Shahryari M. On the representations and automorphisms of polyadic groups // Commun. Algebra. 2012. V. 40. P. 2199–2212.
17. Khodabandeh H., Shahryari M. Simple polyadic groups// Siberian Math. Journal, 2014.


