Few-body anharmonic oscillators and the matrix continued fractions