Polynomial solution $xy''+(1-x)y'+ \lambda y=0$ 
For which values of the constant $\lambda$ does the differential
  equation  $$xy''+(1-x)y'+ \lambda y=0$$ have a polynomial solution?

I was thinking about solving this problem with the Theorem of Frobenius (even thought I am not sure if I should use it in this case since I don't know what regular singular point I should take).
Then we have $$y''+ \frac{1-x}{x}y'+ \frac{\lambda}{x} y=0$$
Then we have that $x=0$ is a regular singular point, that means that there exists at least one solution of the form $y= \sum_{n=0}^{\infty} a_n (x-x_0)^{n+r}$, where $r$ and $a_n$ are constants.
So what? I know that the solution exists but I need to determine $\lambda$ and this theorem doesn't really help.
Any other solutions would be highly appreciated. Thank you!
 A: Suppose that $\lambda$ gives a polynomial solution $y(x)=\sum_{k=0}^na_kx^k$ with $a_n\ne 0$.  Then
$$y'(x)=\sum_{k=0}^nka_kx^{k-1}=\sum_{k=0}^n(k+1)a_{k+1}x^k$$
and
$$y''(x)=\sum_{k=0}^nk(k-1)a_kx^{k-2}=\sum_{k=0}^n(k+1)ka_{k+1}x^{k-1},$$
where we set $a_{n+1}=0$.  Hence
$$xy''(x)=\sum_{k=0}^n(k+1)ka_{k+1}x^k$$
and
$$(1-x)y'(x)=y'(x)-xy'(x)=\sum_{k=0}^n(k+1)a_{k+1}x^k-\sum_{k=0}^nka_kx^k.$$
Therefore
$$xy''(x)+(1-x)y'(x)+\lambda y(x)=\sum_{k=0}^n\Big((k+1)ka_{k+1}+(k+1)a_{k+1}-ka_k+\lambda a_k\Big)x^k.$$
This shows that
$$(k+1)^2a_{k+1}=(k-\lambda)a_k$$
for every $k=0,1,2,\ldots,n$.  In particular, when $k=n$, we have
$$0=(n+1)^2a_{n+1}=(n-\lambda)a_n.$$
Since $a_n\neq 0$, we get $\lambda=n$.  Thus $\lambda$ must be a non-negative integer.
Now if $\lambda=n$, then we can then show by induction that
$$a_k=\frac{(-1)^k}{k!}\binom{n}{k}a_0$$
for $k=0,1,2,\ldots,n$.  This yields a polynomial solution
$$y(x)=a_0\sum_{k=0}^n\frac{(-1)^k}{k!}\binom{n}{k}x^k=a_0L_n(x),$$
where $L_n$ is the $n$th Laguerre polynomial.
For a general $\lambda$, the solution $y(x)$ is a linear combination of $L_\lambda(x)$ and $U_\lambda(x)$, where
$$L_\lambda(x)=\sum_{k=0}^\infty\frac{(-1)^k}{k!}\binom{\lambda}kx^k={_1F_1}(-\lambda;1;x)$$
is the Laguerre function with parameter $\lambda$, and $$U_\lambda(x)=x^\lambda\ {_2F_0}\left(-\lambda,1-\lambda;;-\frac1x\right).$$
Here ${_p}F_q$ is the generalized hypergeometric function.
