Gravity in $d$ spacetime dimensions Given the following action 
$$S=\frac{1}{16\pi G}\int d^4x \sqrt {-g}(R+aR^2+bR_{\mu\nu}R^{\mu\nu}+cR_{\mu\nu\lambda\sigma}R^{\mu\nu\lambda\sigma}),$$
which is in 4D. 


*

*How to we generalise this action into $d$ spacetime dimension? By which I will need the specific form of Scalar curvature, Ricci tensor, and Riemann tensor. 

*Also I want to know if the proportionality factor $\frac{1}{16\pi G}$ changes?

Edited to add: One way I can think of answering myself is to write the Riemann Tensor in terms of Weyl Tensor as 
$$R_{\mu\nu\rho\sigma}=C_{\mu\nu\rho\sigma}+\frac{1}{D-2}(g_{\mu\rho}R_{\nu\sigma}+R_{\mu\rho}g_{\nu\sigma}-g_{\nu\rho}R_{\mu\sigma}-R_{\nu\rho}g_{\mu\sigma})-\frac{1}{(D-1)(D-2)}R(g_{\mu\rho}g_{\nu\sigma}-g_{\mu\sigma}g_{\nu\rho})$$ where one can use contraction to derive $R_{\mu\nu}$ and $R$. But is there any simpler way?
 A: In terms of a metric $g_{ab}$, the Riemann curvature tensor is given by,
$$R^a_{bcd} = \partial_c \Gamma^a_{db} - \partial_d \Gamma^a_{cb} + \Gamma^a_{c e} \Gamma^e_{d b} - \Gamma^a_{de} \Gamma^e_{c b}$$
and consequently changing $d$ does not change the formula, though of course the actual numerical measures of curvature may change. Nevertheless, there are cases where there are additional, equivalent expressions, because things may simplify in certain dimensions. For the case $d=2$, we have,
$$ R_{abcd} = \frac{1}{2}R \left(g_{ac}g_{bd} - g_{ad}g_{bc} \right)$$
a convenient expression due to the symmetries of the tensors. It shows that in two dimensions, the fact that $R=0$ is sufficient to imply $R_{abcd} = 0$, i.e. full Riemann flatness. This is not generally the case for an arbitrary dimension, $d$, and is not the case in $d=4$ (where we usually do general relativity).
Hence, your expression does not require any adjustments for general $d$, except $4 \to d$. That being said, if you choose to change from $4$ to say, $2$ dimensions, some terms can be simplified since, e.g.$^\dagger$
$$\frac{1}{4\pi} \int_M d^2x \, \sqrt{g} \, R = \chi(M)$$
is a topological invariant, the Euler characteristic of the manifold. That being said, one should be mindful that changing the dimension $d$ of an action may have important phenomenological and physical implications, since for example renormalizability is dependent on $d$.

$\dagger$ This is a consequence of the Chern-Gauss-Bonnet theorem which in turn can be shown to follow from the Atiyah-Singer index theorem, a more general result. Note it applies iff $M$ is compact.
