A positive formula for the dimensions of homogeneous components of free Lie algebras The homogeneous component of degree $k$ in the free Lie algebra $\mathfrak{Lie}(x_1,\dots,x_n)$ in $n$ letters is of dimension $$g_n(k)=\frac{1}{k}\sum_{d|k}\mu(d)n^{k/d}.$$ This is also the number of Lyndon words of length $k$ in $n$ letters, and of a few other things...
Question: Is there a positive formula for this number?
As an aside,
Question: Is there a corresponding formula for the dimensions of the homogeneous components of the free Lie triple system on $n$ letters?
 A: This doesn't answer the question, but might still be of interest to you.  Let $V$ be the $n$-dimensional vector space spanned by your $n$ letters.
The vector space $V^{\otimes k}$ has a natural $S_k$ action.  There exists an $S_k$ module, which I will denote $\text{Lie}(k)$, such that the $k$th homogenous component of the free Lie algebra on $V$ is isomorphic to
$V^{\otimes k} \otimes_{S_k} \text{Lie}(k)$.
And this module has dimension $(k-1)!$.  This wont help you with the dimensions you want, but I think that it's interesting.
If you want to read more then you need to learn about operads, and in particular the Lie operad.
If you just want to know the $S_k$-module structure on $\text{Lie}(k)$ then it can be given as follows:
Let $C_k$ be a subgroup of $S_k$ generated by a $k$-cycle.  Let $W$ be a 'primitive' representation of $C_k$.  (this requires a primitive $k$th root of unity in your field).
Then the module we are looking for is $W$ induced up to $S_k$.
This last bit is a bit mysterious to me.
A: For your question about Lie triple systems:
In my article "Veronese powers of operads and pure homotopy algebras" joint with Martin Markl and Elisabeth Remm, Eur. J. Math. 6 (2020), 829-863 (https://link.springer.com/article/10.1007/s40879-019-00351-6), it is established that the operad of Lie triple system is isomorphic to the operad of odd arity components of the Lie operad. Since the free algebra is obtained by evaluation of the corresponding Schur functor, it follows that the dimensions of homogeneous components of the free Lie triple system are equal to the dimensions of odd degree homogeneous components of the free Lie algebra on the same generators.
A: Now, to the matter of "positive formulas".
Classical result of Kraskiewicz and Weyman (preprint W. Kraskiewicz, J. Weyman. Algebra of Invariants and the Action of a Coxeter Element. Math. Inst. Copernicus Univ. Chopina, Torun (1987), published W. Kraskiewicz, J. Weyman. Algebra of invariants and the action of a Coxeter element. Bayreuth. Math. Schr., 63 (2001)) proves that the multiplicity of the Specht module $S^{\lambda}$ in $\mathrm{Lie}(n)$ is given by an elegant combinatorial formula: it is equal to the dimension of standard Young tableaux of shape $\lambda$ and major index congruent to $1$ modulo $n$. Recall that the major index is equal to the sum of all $i$ such that $i+1$ is strictly below $i$ in the tableau. By Schur-Weyl duality, this means that the irreducible representation $S^\lambda(V)$ of $GL(V)$ appears in the free Lie algebra generated by $V$ with that same multiplicity, the major index. Since dimensions of irreducible representations of $GL(V)$ admit well-known positive formulas, you get a positive formula for the dimension of the homogeneous component of the free Lie algebra.
