  The effective-interaction theory has been one of the useful and practical
methods for solving nuclear many-body problems based on the shell model.
Various approaches have been proposed which are constructed in terms of the
so-called $\widehat{Q}$ box and its energy derivatives introduced by Kuo {\it
et al}. In order to find out a method of calculating them we make decomposition
of a full Hilbert space into subspaces (the Krylov subspaces) and transform a
Hamiltonian to a block-tridiagonal form. This transformation brings about much
simplification of the calculation of the $\widehat{Q}$ box. In the previous
work a recursion method has been derived for calculating the $\widehat{Q}$ box
analytically on the basis of such transformation of the Hamiltonian. In the
present study, by extending the recursion method for the $\widehat{Q}$ box, we
derive another recursion relation to calculate the derivatives of the
$\widehat{Q}$ box of arbitrary order. With the $\widehat{Q}$ box and its
derivatives thus determined we apply them to the calculation of the
$E$-independent effective interaction given in the so-called Lee-Suzuki (LS)
method for a system with a degenerate unperturbed energy. We show that the
recursion method can also be applied to the generalized LS scheme for a system
with non-degenerate unperturbed energies. If the Hilbert space is taken to be
sufficiently large, the theory provides an exact way of calculating the
$\widehat{Q}$ box and its derivatives. This approach enables us to perform
recursive calculations for the effective interaction to arbitrary order for
both systems with degenerate and non-degenerate unperturbed energies.
