In this paper, we characterize the boundedness of a generalized Hardy operator and its adjoint on \(\ell _{w}^{p}(\mathbb {Z}_{+})\) , via the discrete weights w belonging to the discrete classes \({\mathcal {B}}_{p}^{\lambda }\) and \({\mathcal {B}}_{p}^{*\lambda }\) , respectively. As an application of the corresponding boundedness, we show that the self-improving property of a discrete class \({\mathcal {B}}_{p}\) is valid, i.e., we prove that if \(w\in {\mathcal {B}}_{p}\) for some \(1<p<\infty \) , then there exists \(\varepsilon >0\) such that \(w\in {\mathcal {B}}_{p-\varepsilon }\) . Similarly, we also prove the self-improving property of a discrete class \({\mathcal {B}}_{p}^{*}\) , i.e., we show that if \(w\in {\mathcal {B}}_{p}^{*}\) for some \(1<p<\infty \) , then there exists \(\varepsilon >0\) such that \(w\in {\mathcal {B}}_{p+\varepsilon }^{*}.\) Finally, the established results are also applied for proving the boundedness of the Hardy–Littlewood maximal operator on Lorentz sequence spaces.