  In this paper we develop the notion of ergodicity to include functions
dominated by a weight $w$. Such functions have polynomial means and include,
amongst many others, the $w$-almost periodic functions. This enables us to
describe the asymptotic behaviour of unbounded solutions of linear evolution,
recurrence and convolution equations. To unify the treatment and allow for
further applications, we consider solutions $\phi : G\rightarrow X$ of
generalized evolution equations of the form $ (*) (B\phi)(t)=A\phi (t)+\psi
(t)$ for $t\in G$ where $G$\ is a locally compact abelian group with a closed
subsemigroup $J$, $A$ is a closed linear operator on a Banach space $X$, $\psi
:G\rightarrow X$ is continuous and $B$ is a linear operator with characteristic
function $\theta_{B}:\hat{G}\rightarrow \mathbf{C}$. We introduce the resonance
set $\theta_{B}^{-1}(\sigma (A))$ which contains the Beurling spectra of all
solutions of the homogeneous equation $B\phi =A\circ \phi$. For certain classes
${\F} $ of functions from $J$ to $% X,$ the spectrum $sp_{{\F}}(\phi)$ of $\phi
$ relative to $% {\F} $ is used to determine membership of ${\F}.$ Our main
result gives general conditions under which $sp_{{\F}}(\phi)$\ is a subset of
the resonance set. As a simple consequence we obtain conditions under which
$\psi |_{J}\in \F$ implies $\phi |_{J}\in {\F}.$ An important tool is our
generalization to unbounded functions of a theorem of Loomis. As applications
we obtain generalizations or new proofs of many known results, including
theorems of Gelfand, Hille, Katznelson-Tzafriri, Esterle et al., Ph\'{o}ng,
Ruess and Arendt-Batty.
