\[ y(x) (2 l x (-n+p-1)+2 l p+m)+2 \left (x (-2 l+n+1)-l x^2+n+1\right ) y'(x)+x (x+2) y''(x)=0 \] ✓ Mathematica : cpu = 0.407143 (sec), leaf count = 148
DSolve[(m + 2*l*p + 2*l*(-1 - n + p)*x)*y[x] + 2*(1 + n + (1 - 2*l + n)*x - l*x^2)*Derivative[1][y][x] + x*(2 + x)*Derivative[2][y][x] == 0,y[x],x]
\[\left \{\left \{y(x)\to c_2 \left (-\frac {x}{2}-1\right )^{\frac {n}{2}+\frac {1}{2}} x^{-n} (x+2)^{-\frac {n}{2}-\frac {1}{2}} \text {HeunC}\left [-4 l n-2 l p-m+n^2+n,-4 l (p-1),1-n,n+1,4 l,-\frac {x}{2}\right ]+c_1 \left (-\frac {x}{2}-1\right )^{\frac {n}{2}+\frac {1}{2}} (x+2)^{-\frac {n}{2}-\frac {1}{2}} \text {HeunC}\left [-2 l p-m,4 l (n-p+1),n+1,n+1,4 l,-\frac {x}{2}\right ]\right \}\right \}\] ✓ Maple : cpu = 0.174 (sec), leaf count = 105
dsolve(x*(x+2)*diff(diff(y(x),x),x)+2*(n+1+(n+1-2*l)*x-l*x^2)*diff(y(x),x)+(2*l*(p-n-1)*x+2*p*l+m)*y(x)=0,y(x))
\[y \left (x \right ) = \left (x +2\right )^{-\frac {n}{2}-\frac {1}{2}} \left (-\frac {x}{2}-1\right )^{\frac {n}{2}+\frac {1}{2}} \left (\HeunC \left (4 l , -n , n , -4 p l , \frac {\left (4 n +4 p +4\right ) l}{2}-\frac {n^{2}}{2}+m -n , -\frac {x}{2}\right ) x^{-n} c_{2}+\HeunC \left (4 l , n , n , -4 p l , \frac {\left (4 n +4 p +4\right ) l}{2}-\frac {n^{2}}{2}+m -n , -\frac {x}{2}\right ) c_{1}\right )\]