4. Given vectors $\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}$ satisfy
$$
|\boldsymbol{a}|:|\boldsymbol{b}|:|\boldsymbol{c}|=1: k: 3\left(k \in \mathbf{Z}_{+}\right) \text {, }
$$

and $\boldsymbol{b}-\boldsymbol{a}=2(\boldsymbol{c}-\boldsymbol{b})$.
If $\alpha$ is the angle between $\boldsymbol{a}$ and $\boldsymbol{c}$, then $\cos \alpha=$ $\qquad$
4. $-\frac{1}{12}$.

From $b-a=2(\boldsymbol{c}-\boldsymbol{b})$
$\Rightarrow b=\frac{1}{3} a+\frac{2}{3} c$
$\Rightarrow b^{2}=\frac{1}{9} a^{2}+\frac{4}{9} c^{2}+\frac{4}{9} a \cdot c$.
Notice, $|\boldsymbol{a}|:|\boldsymbol{b}|:|\boldsymbol{c}|=1: k: 3$.
Then $k^{2}=\frac{1}{9}+4+\frac{4}{3} \cos \alpha \in(2,6)$.
Since $k \in \mathbf{Z}_{+}$, thus, $k=2$.
Therefore, $\cos \alpha=-\frac{1}{12}$.