I found a recursive scheme to solve the Kohn-Sham equation. However, I have a misunderstanding: how to choose the electron density for the initial step? There are two ways to calculate the electron density:
\begin{equation} \begin{gathered} n (\mathbf{r_1})=N \int |\Psi(\mathbf{r_1}, \sigma_1,..., \mathbf{r_N}, \sigma_N)|^2 \, d\sigma_1 \mathbf{dr_2} d \sigma_2...\mathbf{dr_N} d \sigma_N \end{gathered} \end{equation}
\begin{equation}
\begin{gathered}
n(\mathbf{r_1}) =\sum_{i}^{N}|\varphi_i(\mathbf{r_1})|^2
\end{gathered}
\end{equation}
However, in the beginning we do not know the functions $\varphi_i$. And in principle, we never know the multi-electron function $\Psi$.