Solving $m\ddot{x} = atx$ using Frobenius method If we have the differential equation in $x$ w.r.t the time $t$: 

$$m\ddot{x} = atx\tag{1}$$

I'm trying to solve $(1)$, with the initial conditions $x(0) := x_0$ and $v(0) := v_0$,  using Frobenius method. So let $x$ be a infinite sum 
$$x(t) = \sum_{n=0}^{\infty}b_nt^n$$
Then we will get 
$$\dot{x} = \sum_{n=1}^\infty nb_nt^{n-1}\,\,\,;\,\,\,\ddot{x} = \sum_{n=2}^\infty n(n-1)b_nt^{n-2}$$
setting in the equation $(1)$ we get
$$\sum_{n=2}^\infty mn(n-1)b_nt^{n-2} - \sum_{n=0}^\infty ab_nt^{n+1} = 0$$
Now we want to derive the recurrence relation for the constants. So what I did was, in the first summation set $n-2 \to n'$ and then  
$$\sum_{n'=0}^\infty m(n'+2)(n'+1)b_{n'+2}t^{n'} - \sum_{n=0}^\infty ab_nt^{n+1} = 0 \implies $$
$$2mb_2 + \sum_{n'=1}^\infty m(n'+2)(n'+1)b_{n'+2}t^{n'} - \sum_{n=0}^\infty ab_nt^{n+1} = 0$$
Now use $n' \to n+1$ such that $n = n'-1$ and we get 
$$2mb_2 + \sum_{n=0}^\infty m(n+3)(n+2)b_{n+3}t^{n+1} - \sum_{n=0}^\infty ab_nt^{n+1} = 0 \implies $$
$$2mb_2 + \sum_{n=0}^\infty \left \{m(n+3)(n+2)b_{n+3}\ - ab_n \right \}t^{n+1} = 0$$
We conclude then that $b_2 = 0$ and that $$b_{n+3} = \frac{a}{m(n+3)(n+2)}b_n$$
Question:Is this correct? There exists a better form (closed form) to set this coefficients for a given $n \in \mathbb{N}$ ? How can I use the constants $x_0,v_0$ in the answer for $x$?
What I tried was to see that $b_0, b_1 \in \mathbb{R}$ are the constants that are free so they should be somehow correlated to the initial conditions. Also we get that, for example

$$b_{3n} = \frac{(a/m)^n}{(3n)!}\prod_{i=0}^{n-1} (3i+1)b_0 \tag{2}$$

for $n \geq 1$. 

EDIT: Working on this problem I was able to set this relations below. Using that we have $(2)$ and also that it's easy to show 

$$b_{3n+1} = \frac{(a/m)^n}{(3n+1)!}\prod_{i=0}^{n-1}(3i+2)b_1; \,\, n\geq 1 \tag{3}$$

We can note that 
$$x(t) = b_0 + b_1t+b_3t^3+b_4t^4+b_6t^6+b_7t^7 + \dots= b_0+b_1t + \sum_{n=1}^\infty b_{3n}t^{3n} + \sum_{n=1}^\infty b_{3n+1}t^{3n+1}$$
So we'll get 
$$x(t) = b_0 + b_1 t\sum_{n=1}^\infty \left( \frac{a}{m}\right)^n \left[ \frac{1}{(3n)!}t^{3n}b_0\prod_{i=0}^{n-1}(3i+1) + \frac{1}{(3n+1)!}t^{3n+1}b_1\prod_{i=0}^{n-1}(3i+2)\right]$$
We can bring the products in front and instead of having two we get just one but I couldn't get so far.
 A: Direct substitution into the original ansatz for $x(t)$ gives $x_0=b_0,v_0=b_1$. This is one reason the Frobenius method is well-suited to IVPs and, by comparison at least, poorly suited to BVPs: the coefficients in the expansion are trivially related to derivatives at the point of expansion.
Past that point, as a sanity check, it should be no surprise that you get $b_{n+3}$ is equal to something times $b_n$ because the LHS has its indices "reduced" by 2 by the derivatives and the RHS has its indices "increased" by 1 by the factor of $t$. So the indices at least make sense.
For dimensional reasons it might make more sense to factor out $\frac{a}{m}$ from the $n$-dependent stuff (but that's just a matter of style really).
A: $$m\ddot x(t)=a\,t\,x(t)\tag 1$$
We look for a power series solution of the form
$$x(t)=\sum _{k=0}^{\infty}a_kt^{k}\tag 2$$
We have
$$
\begin{align}
\dot x(t)&=\sum _{k=0}^{\infty}k\,a_kt^{k-1}=\sum _{k=0}^{\infty}(k+1)a_{k+1}t^{k}\\
\ddot x(t)&=\sum _{k=0}^{\infty}k(k+1)a_{k+1}t^{k-1}=\sum _{k=0}^{\infty}(k+1)(k+2)a_{k+2}t^{k}\tag 3
\end{align}
$$
Substituting (2) and (3) in the eq. (1) we have
$$
m\sum _{k=0}^{\infty}(k+1)(k+2)a_{k+2}t^{k}=a t \sum _{k=0}^{\infty}a_kt^{k}\tag 4
$$
and, putting $\frac{a}{m}=\gamma$, the eq. (4) becomes
$$
\sum _{k=0}^{\infty}(k+1)(k+2)a_{k+2}t^{k}-\gamma \sum _{k=0}^{\infty}a_kt^{k+1}=2a_2+\sum _{k=1}^{\infty}\Big[(k+1)(k+2)a_{k+2}-\gamma a_{k-1}\Big]t^k=0\tag 5
$$
The equality (5) holds for all $t$ if each term is separately $0$. Therefore, 
$$
\begin{align}
a_2&=0\\
(k+2)(k+1)a_{k+2}&=\gamma a_{k-1}
\end{align}
$$
For $k=3$, we obtain $5\cdot 4\,a_5=20a_5=a_2=0$ and by induction,  $$a_2=a_5=a_8=\ldots=a_{3k-1}=0\;\;\text{ for }\;k=1,\, 2,\ldots$$
For the terms $a_{3k}$ and $a_{3k+1}$ we find in the same way
$$
\begin{align}
a_{3k}&=\frac{\gamma^k a_0}{[(3k)(3k-1)][(3k-3)(3k-4)]\cdots [6\cdot 5][3\cdot 2]}\;\;\text{ for }\;k=1,\, 2,\ldots\\
a_{3k+1}&=\frac{\gamma^k a_1}{[(3k+1)(3k)][(3k-2)(3k-3)]\cdots [7\cdot 6][4\cdot 3]}\;\;\text{ for }\;k=1,\, 2,\ldots
\end{align}
$$
Thus the general solution of (1) is
$$
x(t)=a_0+ a_1t+\sum_{k=1}^\infty a_{3k}\,t^{3k}+\sum_{k=1}^\infty a_{3k+1}\,t^{3k+1}
$$
Observe that equation $x''(t)-\gamma t x(t)=0$ is known in literature as Airy differential equation and the solution might be written as
 $$x(t)=\frac{1}{3}\sqrt{t}\left[\lambda_1 I_{-1/3}\left(\frac{2}{3}\sqrt{\gamma}t^{3/2}\right)-\lambda_2I_{1/3}\left(\frac{2}{3}\sqrt{\gamma}t^{3/2}\right)\right]$$
where $I_{\nu}(z)$ is a modified Bessel function of the first kind and $\lambda_1$ and $\lambda_2$ costants, or usually expressed in terms of the Airy functions $\mathrm{Ai}(z)$ and $\mathrm{Bi}(z)$
$$x(t)=\mu_1 \mathrm{Ai}\left(\gamma^{1/3}t\right)+\mu_2 \mathrm{Bi}\left(\gamma^{1/3}t\right)$$
where $\mu_1$ and $\mu_2$ costants. 
