After failing this attempt, I've revised my proof sketch and I've come to the following version of the equation in the title.
So, let $G$ be a finite group, say $G=\lbrace e,a_1,\dots,a_{n-1} \rbrace$, and $C_G(a_i)$ denote the centralizer of $a_i$ in $G$. Then, in the case $Z(G)=\lbrace e \rbrace$, the following equation seems to hold:
\begin{equation} n(n-1)=\sum_{j=1}^{n-1}\delta(\Lambda)_j|C_G(a_j)| \end{equation}
where $\delta(\Lambda)$ is a $(n-1)$-term partition of the integer $\Lambda:=\sum_{\substack{\lambda_i \in \lambda(n-1)\\ \lambda_i>1}}\lambda_i^2$, being $\lambda(n-1)$ a partition of the integer $n-1$.
E.g., for $G=S_3$, if we take $\lambda(5)=(2,3)$ and $\delta(13)=(2,2,3,3,3)$, we get: \begin{equation} 6\cdot5 = 2^2+3^2+2\cdot(3-1)+2\cdot(3-1)+3\cdot(2-1)+3\cdot(2-1)+3\cdot(2-1) \end{equation}
As I'm not very skilled on symmetric groups, can someone check whether above formula works also for $S_4$, etc. or some other group with trivial center?
Proof.
Let's define the collections $F_a:=(\varphi_g(a))_{g\in G}$, where $\varphi_g(a):=g^{-1}ag$, and denote by $\tilde F_a$ the set composed of the distinct elements of $F_a$. We have:
- $\forall a \in G, a \in \tilde F_a$; then, $\tilde F_a \ne \emptyset$;
- $\forall a \in G, |F_a|=n$;
- $\tilde F_e=\lbrace e \rbrace$;
- $Z(G)=\lbrace e \rbrace \Rightarrow |\tilde F_a|>1, \forall a \in G, a \ne e$;
- $F_a=(\varphi_{g}(a))_{g \in C_G(a)} \cup (\varphi_{g}(a))_{g \in ∁_G(C_G(a))}=(a,a,...,a) \cup (\varphi_{g}(a))_{g \in ∁_G(C_G(a))}$, with $|(a,a,...,a)|=|C_G(a)|$;
- given $a,b \in G, b \ne a$, it is $\tilde F_b=\tilde F_a \Leftrightarrow b \in \tilde F_a$;
- the collection $(\varphi_{g}(a))_{g \in ∁_G(C_G(a))}$ contains as many copies of each element $b \in \tilde F_a \setminus \lbrace a \rbrace$ as is the cardinality of the set $\tilde{\mathcal{F}}_b^{(a)}:=\lbrace g \in \complement_G(C_G(a))|\varphi_g(a)=b \rbrace$, minus $1$.
We may also think of a $n \times n$ "matrix" such that, given $a \in G$, the "$a$-th" row is made of the elements of the set $\lbrace \varphi_a(g)|g \in G \rbrace$ and the "$a$-th" column is made of the elements of the collection $F_a=(\varphi_g(a))_{g \in G}$. According to this "picture", we have that:
- for 3 and 4, there's one and only one column with all the entries equal to each other (all $e$);
- for 5, the "$a$-th" column contains as many copies of $a$ as the order of $C_G(a)$, minus $1$;
- for 6 and 7, there are $|\tilde F_a|$ columns with the same, differently permuted, $|\tilde F_a|$ distinct elements (included the "index" $a$); each of these columns has as many copies of each element $b$ of $\tilde F_a \setminus \lbrace a \rbrace$ as is the integer $|\tilde{\mathcal{F}}_b^{(a)}|-1$.
Now, $\tilde{\mathcal{F}}_b^{(a)}=\emptyset \Leftrightarrow b \notin \tilde F_a$, and then $b \in \tilde F_a \Rightarrow \tilde{\mathcal{F}}_b^{(a)} \ne \emptyset \Rightarrow |\tilde{\mathcal{F}}_b^{(a)}|=|C_G(a)|$ (for the last implication, see here).
By summing on all the columns, we have that a partition $\lambda(n-1)$ of the integer $n-1$ exists such that:
\begin{align} n^2& = n+\sum_{\substack{\lambda_i \in \lambda(n-1)\\ \lambda_i>1}}\lambda_i^2+\sum_{a \in G \setminus \lbrace e \rbrace}(|C_G(a)|-1)+\sum_{a \in G \setminus \lbrace e \rbrace}\sum_{b \in \tilde F_a \setminus \lbrace a \rbrace}(|\tilde{\mathcal{F}}_b^{(a)}|-1)=\\&=n+\sum_{\substack{\lambda_i \in \lambda(n-1)\\ \lambda_i>1}}\lambda_i^2+\sum_{a \in G \setminus \lbrace e \rbrace}(|C_G(a)|-1)+\sum_{a \in G \setminus \lbrace e \rbrace}|\tilde F_a \setminus \lbrace a \rbrace|(|C_G(a)|-1)=\\&=n+\sum_{\substack{\lambda_i \in \lambda(n-1)\\ \lambda_i>1}}\lambda_i^2+\sum_{a \in G \setminus \lbrace e \rbrace}(|\tilde F_a \setminus \lbrace a \rbrace|+1)(|C_G(a)|-1) \end{align}
But, $$\sum_{a \in G \setminus \lbrace e \rbrace}(|\tilde F_a \setminus \lbrace a \rbrace|+1)=\sum_{\substack{\lambda_i \in \lambda(n-1)\\ \lambda_i>1}}\lambda_i^2$$
so, if we define $\delta_a:=|\tilde F_a \setminus \lbrace a \rbrace|+1$, we get:
\begin{equation} n(n-1) = \sum_{\substack{\lambda_i \in \lambda(n-1)\\ \lambda_i>1}}\lambda_i^2+\sum_{a \in G \setminus \lbrace e \rbrace}\delta_a(|C_G(a)|-1) \end{equation}
with $$\sum_{a \in G \setminus \lbrace e \rbrace}\delta_a=\sum_{\substack{\lambda_i \in \lambda(n-1)\\ \lambda_i>1}}\lambda_i^2$$
and then, for a given labelling of the elements of $G$,
\begin{equation} n(n-1)=\sum_{j=1}^{n-1}\delta(\Lambda)_j|C_G(a_j)| \end{equation}
where $\delta(\Lambda)$ is a $(n-1)$-term partition of the integer $\Lambda:=\sum_{\substack{\lambda_i \in \lambda(n-1)\\ \lambda_i>1}}\lambda_i^2$.
Addendum
As shown, each $a \in G$, $a \ne e$, gives rise to the collection $F_a$ made of:
- $|\tilde F_a|$ distinct elements of $G$, included $a$;
- $|C_G(a)|-1$ copies of $a$;
- $|\mathcal{F}_b^{(a)}|-1=|C_G(a)|-1$ copies of $b$, for each $b \in \tilde F_a \setminus \lbrace a \rbrace$.
Then, \begin{align} n=&|\tilde F_a|+|C_G(a)|-1+(|C_G(a)|-1)(|\tilde F_a|-1)=\\=&|\tilde F_a|+|C_G(a)|-1+|C_G(a)||\tilde F_a|-|C_G(a)|-|\tilde F_a|+1=\\=&|C_G(a)||\tilde F_a| \end{align}
so $|\tilde F_a|=[G:C_G(a)]$, and finally $$\sum_{a \in G \setminus \lbrace e \rbrace}[G:C_G(a)]=\sum_{\substack{\lambda_i \in \lambda(n-1)\\ \lambda_i>1}}\lambda_i^2$$
For a finite group of order $n$ and trivial center, a partition $\lambda(n-1)$ of $n-1$ with no "1" summands exists, such that the sum of the indexes of the centralizers of all the elements of the group (but the unit) is equal to the sum of the squares of the summands of $\lambda(n-1)$.