I am trying to implement the following relation in Mathematica for any $k$:
$$\begin{align} t_{n,n_1, \ldots, n_k} &= \frac{1}{2} \sum_{m=0}^{n-2} \left( t_{m,n-m-2,n_1, \ldots, n_k} - \frac{1}{N} t_{n-2,n_1,\ldots,n_k} \right) + \frac{n_1}{2} \left( t_{n+n_1-2,n_2,\ldots,n_k} - \frac{1}{N} t_{n-1,n_1-1,n_2,\ldots,n_k} \right) \\ & \qquad\qquad\qquad + \ldots + \frac{n_k}{2} \left( t_{n+n_k-2,n_1,\ldots,n_{k-1}} - \frac{1}{N} t_{n-1,n_k-1,n_2,\ldots,n_{k-1}} \right)\,. \tag{1} \end{align}$$
The start values are:
$$t_0 = N\,, \qquad t_1 = 0\,, \qquad t_2 = \frac{N^2-1}{2}\,, \tag{2}$$
and note that the indices are not ordered.
The first term is easy and can be implemented with something of the type:
t[n_, nk___] := 1/2 Sum[t[m, n - m - 2, nk] - 1/N t[n - 2, nk], {m, 0, n - 2}]
But I am struggling with the other terms, since the indices do not appear as a group together. I can always write the relation up to a given $k$, but is it possible to generalise to any $k$, and if yes how?
Small extra question: I know I am not supposed to use N
as a variable, but I am so used to it and it always works. Would it be possible to use Nc
instead, but have it displayed as N
? This exists for example in the FeynCalc package, where the variable SUNN
is displayed as N
.
Nc
asN
you can useFormat[Nc]:=N
$\endgroup$MakeBoxes[Nc, StandardForm] := InterpretationBox["N", Nc]
is probably a better choice, because the output in the notebook will be interpreted correctly even if you edit/copy it. $\endgroup$