Power series expansions 
The following initial-value problems has a unique solution that is
  analytic at the origin. Find the power series expansion
  $\sum_{k=0}^\infty a_kz^k$ of the solution by determining a recurrence
  relation for the coefficients $a_j$.
a.  $\begin{cases} \frac{d^2f}{dz^2}-z\frac{df}{dz}-f=0  \\ f(0)=1,\
 f'(0)=0  \end{cases}$
b.$\begin{cases} \frac{d^2f}{dz^2}+4f=0  \\ f(0)=1,\ f'(0)=1 
 \end{cases}$

My attempt:
For a, I know that $f''=zf'+f \implies f''(0)=0\dot\ f'(0)+f(0)=0+1=1$, but the answer is $$\sum^{\infty}_{j=0}\frac{1}{j!}(\frac{z^2}{2})^j=e^{z^2/2}$$
 A: It is is a good idea to start from
$$
f''=zf'+f.
$$
This yields
$$
\sum_{k\geq 2} k(k-1)a_kz^{k-2}=z\sum_{k\geq 1}ka_kz^{k-1}+\sum_{k\geq 0}a_kz^k
$$
hence
$$
\sum_{k\geq 0} (k+2)(k+1)a_{k+2}z^{k}=\sum_{k\geq 0}(k+1)a_kz^{k}.
$$
Equating the coefficients, we get
$$
(k+2)(k+1)a_{k+2}=(k+1)a_k\quad\Rightarrow\quad a_{k+2}=\frac{a_k}{k+2} \text{or}\ a_k=a_{k+2}(k+2)
$$
and the initial conditions yield
$$
a_0=1\qquad a_1=0.
$$
By induction, it follows readily that $a_{2k+1}=0$ for all $k\geq 0$.
Now
$$
a_{2k+2}=\frac{a_{2k}}{2k+2}=\frac{a_{2k}}{2(k+1)}.
$$ 
Also, another induction from the initial conditions and from $a_{k+2}=\frac{a_k}{k+2}$ shows that
$$
a_{2k}=\frac{1}{2^kk!}
$$
Therefore
$$
\sum_{k\geq 0}a_kz^k=\sum_{k\geq 0}\frac{z^{2k}}{2^kk!}=\sum_{k\geq 0}\frac{(z^2/2)^{k}}{k!}=e^{z^2/2}.
$$
Remark: so the power series $f$ has infinite radius of convergence. Moving backwards, what we have done shows that $f$ is a solution of the ODE on $\mathbb{R}$.
A: Assume that $$f=\sum_{k\geq 0} a_k x^k$$
The equation then gives you that
$$\sum_{k\geq 2} a_kk(k-1) x^{k-2}=\sum_{k\geq 1} a_kk x^k+\sum_{k\geq 0} a_k x^k$$
We can normalize this to "$k \geq 0$" to get
$$\sum_{k\geq 0} a_{k+2}(k+2)(k+1) x^{k}=\sum_{k\geq 0} a_kk x^k+\sum_{k\geq 0} a_k x^k$$
It follows $$(k+1)(k+2)a_{k+2}=(k+1)a_k$$ or equivalently $$(k+2)a_{k+2}=a_k$$ 
from this, the solution should be straightforward. Analyze the cases for odd and even indices.
