Cholesky factorization

Could someone help me better understand algorithm 23.1 of “Numerical Linear Algebra” (by Lloyd Threfethen). You can see it here .

What’s being calculated at each step of the outer loop? Given that $A_{k-1}=R_k^*A_kR_k$, I suppose that the answer is $A_k^*R_k$. Am I wrong?

On the same page it is also stated that the computational cost can be evaluated as follows:

$\Sigma_{k=1}^m\Sigma_{j=k+1}^m2(m-j)\approx2\Sigma_{k=1}^m\Sigma_{j=1}^kj\approx\Sigma_{k=1}^mk^2\approx(1/3)m^3 flops$

I understand the last two approximations, but what about the first one?

Edit: algorithm 23.1:

R = A
for k = 1 to m
    for j = k+1 to m 
        R_{j,j:m} = R_{j,j:m}-R_{k,j:m}(conj(R_{kj})/R_{kk});
    R_{k,k:m}=R_{k,k:m}/R_{k,k};

Solutions Collecting From Web of "Cholesky factorization"

The algorithm seems to be for the LDLT decomposition, the Cholesky decomposition would involve the square roots of the diagonal elements.

And
\begin{align}
\sum_{k=1}^m\sum_{j=k+1}^m2(m-j)
&=2\sum_{1\le k<j\le m}^m(m-j)
=2\sum_{j=1}^m(j-1)(m-j)\\
&=2m(0+1+2+…+(m-1))-2(0⋅1+1⋅2+2⋅3+3⋅4+…+m⋅(m-1))\\
&=m^2(m-1)-\tfrac23(m-1)m(m+1)=\tfrac13(m-2)(m-1)m
\end{align}