- I think the statement is that for any dimensional CFT the following is true,

$$\langle T^{\mu}_\mu \rangle = \sum B_n I_n - 2(-1)^{d/2}AE_d,$$

where $E_d$ is the `"Euler density" and $I_n$ are the independent "Weyl invariants of weight $-d$".

(...I am not sure of the definition of the geometric quantities coming on the R.H.S and I wonder if the notion of the "Euler density" and ``Weyl invariants" are related to the ideas of the Weyl tensor and the Euler tensor..)

- For the special case of $3+1$ CFTs I am told that there is a relationship between the effective action and these anomaly coefficients as,

$W = \frac {a_0}{\epsilon^4} + \frac {a_1}{\epsilon^2} + a_2 ln (\epsilon) + w(g)$

where I guess $\epsilon$ is the UV regulator, $W$ is I guess the connected functional/free energy defined as $W = - ln (Z)$ ($Z$ being the partition function), $w(g)$ is the UV finite part dependent on the metric $g$ such that $w(\lambda^2 g) = w(g) - a_2ln(\lambda)$.

The most important and universal part of this answer is apparently that $a_2$ is universal and has the following properties that,

(1) $a_2(e^{-2\omega}g) = a_2(g)$

(2) $a_2 = AE_4 + BI_4 $ where $E_4 = \frac{1}{64}\int (R_{\alpha \beta \mu \nu}R^{\alpha \beta \mu \nu} - 4R_{\mu \nu}R^{\mu \nu} + R^2)$ and $I_4 = -\frac{1}{64}\int (R_{\alpha \beta \mu \nu}R^{\alpha \beta \mu \nu} - 2R_{\mu \nu}R^{\mu \nu} + \frac{R^2}{3})$

Thus one says that the universal part of the free energy of a $3+1$ CFT is given by the integrated conformal anomaly.

I would like to know what is the proof of the above and its generalization to higher dimensions (if known!).

It seems very mysterious to me that anomalies should determine the universal parts of a partition function!