  Let $(R,\mathfrak{m})$ denote an $n$-dimensional Gorenstein ring. For an
ideal $I \subset R$ with $\grade I = c$ we define new numerical invariants
$\tau_{i,j}(I)$ as the socle dimensions of $H^i_{\mathfrak{m}}(H^{n-j}_I(R))$.
In case of a regular local ring containing a field these numbers coincide with
the Lyubeznik numbers $\lambda_{i,j}(R/I)$. We use $\tau_{d,d}(I), d = \dim
R/I,$ to characterize the surjectivity of the natural homomorphism $f : \hat{R}
\to \Hom_{\hat{R}}(H^c_{I\hat{R}}(\hat{R}),H^c_{I\hat{R}}(\hat{R}))$. As a
technical tool we study several natural homomorphisms. Moreover we prove a few
results on $\tau_{i,j}(I)$.
