tl;dr Where do the $\frac{1}{n-2}$ and $\frac{1}{(n-1)(n-2)}$ factors come from in the definition of the Weyl tensor?
The Weyl tensor is the trace-free component of the Riemann curvature tensor. Therefore, it can be simply computed by subtracting the traces.
In dimension $1$, the Riemann curvature vanishes by its symmetries so the trace free part also vanishes.
The Weyl tensor also vanishes in dimension $2$ and $3$, as at least two indices are always equal, so the Riemann curvature is entirely described by its traces.
For dimensions $n \geq 3$, (apparently) $W$ is given by $$W_{ijkl} = R_{ijkl} - \frac{1}{n-2}\left(-g_{jl}R_{ik}+ g_{jk}R_{il}+ g_{il}R_{jk}- g_{ik}R_{jl}\right) - \frac{1}{(n-1)(n-2)}\left(g_{ik}g_{jl}R - g_{il}g_{jk}R\right)$$
However, I don't understand where the $\frac{1}{n-2}$ and $\frac{1}{(n-1)(n-2)}$ factors come from. Why is the formula not $$W_{ijkl} = R_{ijkl} - \frac{1}{n}\left(-g_{jl}R_{ik}+ g_{jk}R_{il}+ g_{il}R_{jk}- g_{ik}R_{jl}\right) - \frac{1}{n^2}\left(g_{ik}g_{jl}R - g_{il}g_{jk}R\right)$$ This seems sensible to me as you are dividing by the factor of the trace of the metric.
I decided to play around to see if I can derive the Schouten tensor instead. It ended up working quite well, and now I've convinced myself of the $n-2$ factors and so on. Here's my proof.
We aim to find $W_{ijkl}$, the trace-free part of $R_{ijkl}$. Given a symmetric tensor $L_{ab}$, define $S_{ijkl}$ to be $g_{l[i}L_{j]k} - g_{k[i}L_{j]l}$. By construction, $S_{ijkl}$ clearly satisfies the symmetries of $R_{ijkl}$. We wish to find $\lambda$ and $L_{ab}$ such that $W_{ijkl} = R_{ijkl} + \lambda S_{ijkl}$. First we contract by $g^{li}$. \begin{align*} W_{ijkl} &= R_{ijkl} + \lambda\left(g_{l[i}L_{j]k} - g_{k[i}L_{j]l}\right)\\ &= R_{ijkl} + \frac{\lambda}{2}\left(g_{li}L_{jk} - g_{lj}L_{ik} - g_{ki}L_{jl} + g_{kj}L_{il}\right)\\ \text{Thus}\ 0 = W_{ijkl}g^{li} &= R_{ijkl}g^{li} + \frac{\lambda}{2}\left(g_{li}L_{jk} - g_{lj}L_{ik} - g_{ki}L_{jl} + g_{kj}L_{il}\right)g^{li}\\ &= R_{jk} + \frac{\lambda}{2}\left(nL_{jk} - L_{jk} - L_{jk} + g_{jk}L\right)\\ &= R_{jk} + \frac{\lambda}{2}\left((n-2)L_{jk} + g_{jk}L\right) \end{align*} Now we contract by $g^{jk}$. \begin{align*} 0 &= R_{jk}g^{jk} + \frac{\lambda}{2}\left((n-2)L_{jk} + g_{jk}L\right)g^{jk}\\ &= R + \frac{\lambda}{2}\left((n-2)L + nL\right) = R + \frac{\lambda}{2}\left(2(n-1)L\right)\\ \text{Thus}\ L &= -\frac{1}{\lambda(n-1)}R \end{align*} We substitute this back to find $L_{jk}$. \begin{align*} 0 &= R_{jk} + \frac{\lambda}{2}\left((n-2)L_{jk} + g_{jk}L\right)\\ &= R_{jk} + \frac{\lambda}{2}\left((n-2)L_{jk} + g_{jk}\left(-\frac{1}{\lambda(n-1)}R\right)\right)\\ L_{jk} &= -\frac{2}{\lambda(n-2)}\left(R_{jk}-\frac{R}{2(n-1)}g_{jk}\right) \end{align*} Finally we substitute this into the first formula. $$\text{Define}\ P_{ab} := \frac{1}{n-2}\left(R_{ab} - \frac{R}{2(n-1)}g_{ab}\right)$$ \begin{align*} \text{Then}\ W_{ijkl} &= R_{ijkl} + \lambda\left(g_{l[i}L_{j]k} - g_{k[i}L_{j]l}\right)\\ &= R_{ijkl} - 2\left(g_{l[i}P_{j]k} - g_{k[i}P_{j]l}\right)\\ &= R_{ijkl} - \frac{1}{n-2}\left(-g_{jl}R_{ik}+ g_{jk}R_{il}+ g_{il}R_{jk}- g_{ik}R_{jl}\right) - \frac{1}{(n-1)(n-2)}\left(g_{ik}g_{jl}R - g_{il}g_{jk}R\right) \end{align*}