## 1 Introduction  
Differential equations with polynomial coefficients have played an important role not only in understanding engineering and physics problems [1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32], but also as a source of inspiration for some of the most crucial results in special functions and orthogonal polynomials [33; 34; 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48]. The classical differential equation  
\[\left(\alpha_{2}\,r^{2}+\alpha_{1}\,r+\alpha_{0}\right)y^{\prime\prime}(r)+ \left(\beta_{1}\,r+\beta_{0}\right)y^{\prime}(r)-\tau_{0}\,y(r)=0\,, \tag{1}\]  
has been a cornerstone of many fundamental results in special functions since the early work of [PERSON] [33], see also References [47; 48; 49]. More recently, the Heun-type equation [41; 42; 43],  
\[r\left(\alpha_{3}\,r^{2}+\alpha_{2}\,r+\alpha_{1}\right)y^{\prime\prime}(r)+ \left(\beta_{2}\,r^{2}+\beta_{1}\,r+\beta_{0}\right)y^{\prime}(r)-\left(\tau_{ 1}\,r+\tau_{0}\right)y(r)=0\,, \tag{2}\]has become a classic equation in mathematical physics. These two equations are members of the general differential equation  
\[P_{n}(r)\,y^{\prime\prime}(r)+Q_{n-1}(r)\,y^{\prime}(r)-R_{n-2}(r) \,y(r)=0\,,\qquad n\geq 2\,,\] \[P_{n}(r)=\sum_{k=0}^{n}\alpha_{k}\,r^{k}\,,\quad Q_{n-1}(r)=\sum_ {k=0}^{n-1}\beta_{k}\,r^{k}\,,\quad R_{n-2}(r)=\sum_{k=0}^{n-2}\tau_{k}\,r^{k}\,, \tag{3}\]  
where \(\{\alpha_{k}\}_{k=0}^{n}\), \(\{\beta_{k}\}_{k=0}^{n-1}\), \(\{\tau_{k}\}_{k=0}^{n-2}\) are real parameters. We assume that the leading term of \(R_{n-2}\
eq 0\) and at least one of the leading terms \(\alpha_{n}\) and \(\beta_{n-1}\) is not zero. The purpose of the present work is to provide an answer to the following question:  
_\"Under what conditions on the equation parameters \(\{\alpha_{k}\}_{k=0}^{n}\), \(\{\beta_{k}\}_{k=0}^{n-1}\), and \(\{\tau_{k}\}_{k=0}^{n-2}\) does the differential Equation (3) have polynomial solutions? If it does have polynomial solutions, how can we construct them?\"_  
With the general theory of linear differential equations as a guide [50; 51], the zeros of the leading polynomial \(P_{n}(r)\) classify the solutions of the Equation (3). The point \(r=\zeta\) is called an ordinary point if \(Q_{n-1}(r)\,/\,P_{n}(r)\) and \(R_{n-2}(r)\,/\,P_{n}(r)\) are analytic functions at \(r=\zeta\), or a regular singular point if \(Q_{n-1}(r)\,/\,P_{n}(r)\) and \(R_{n-2}(r)\,/\,P_{n}(r)\) are not analytic at \(r=\zeta\) but the products \((r-\zeta)\,Q_{n-1}(r)\,/\,P_{n}(r)\) and \((r-\zeta)^{2}\,R_{n-2}(r)\,/\,P_{n}(r)\) are analytic at that point. Using this characterization of singularities, [PERSON] [48] classified the polynomial solutions of (1) in terms of the classical orthogonal polynomials. A different approach which depends on the parameters of the leading coefficient \(P_{n}(r)\), was introduced in Reference [13] to study the polynomial solutions of (1). It was shown that there are seven possible nonzero leading polynomials depending on the combination of the nonzero \(\alpha_{i}\) parameters, for \(i=0,\,1,\,2\). By analyzing each of these cases, the authors [13] were able to explicitly construct all the polynomial solutions of Equation (1) in terms of hypergeometric functions along with the associated weight functions. The \(n\)th-degree leading polynomial coefficient \(P_{n}(r)\) of the differential Equation (3) contains \((2^{n+1}-1)\) nonzero polynomials that depend on the nonzero values of \(\alpha_{i}\), \(i=0,\,1,\,\ldots\,,n\). Out of this polynomial set, there are \(2^{n}\) differential equations for which \(r=0\) is an ordinary point, \((2^{n-1}+2^{n-2})\) differential equations for which \(r=0\) is a regular singular point, and the remaining \((2^{n-2}-1)\) differential equations with irregular singular points that fall outside of the scope of this present work. The criteria for polynomial solutions of second-order linear differential Equation (3) was introduced, using the Asymptotic Iteration Method, in References [52; 53]:  
**Theorem 1**.