We study a stepwise algorithm for solving the indefinite truncated moment problem and obtain the factorization of the matrix describing the solution of this problem into elementary factors. We consider the generalized Jacobi matrix corresponding to Magnus’ continuous P -fraction that appears in this algorithm and the polynomials of the first and second kind that are solutions of the correspondi...