  In this paper we study modified kernel polynomials: $u_n(x) = \sum_{k=0}^n
c_k g_k(x)$, depending on parameters $c_k>0$, where $\{ g_k \}_0^\infty$ are
orthonormal polynomials on the real line. Besides kernel polynomials with $c_k
= g_k(t_0)>0$, for example, $c_k$ may be chosen to be some other solutions of
the corresponding second-order difference equation of $g_k$. It is shown that
all these polynomials satisfy a $4$-th order recurrence relation. The cases
with $g_k$ being Jacobi or Laguerre polynomials are of a special interest.
Suitable choices of parameters $c_k$ imply $u_n$ to be Sobolev orthogonal
polynomials with a $(3\times 3)$ matrix measure. Moreover, a further selection
of parameters gives differential equations for $u_n$. In the latter case,
polynomials $u_n(x)$ are solutions to a generalized eigenvalue problems both in
$x$ and in $n$.
