Given a recursion relation, I would like to generate the first $n$ terms (automatically) without having to go term by term.
Background
Each term is of the form $a_{n}(t)$, that is, $a_{n}$ is a function of $t$. However, $t$ does not appear explicitly - it appears as $f(t)$, where $f$ is an arbitrary function of $t$. As such, the recurrence contains the times derivatives of $a_{n}(t)$ and $f(t)$.
We are given the first term, namely, $a_{0}(t)=1$.
In Mathematica, to compute $a_{1}(t)$, I do the following:
n=1;
a[0][t]=1;
Solve[(n + 1) (n - 4) (6 - n)*a[n][t]*D[f[t], t] ==
-(n - 3) (n - 4)*D[a[n - 1][t], t] +
12*Sum[D[a[k][t], t]*a[n - 1 - k][t], {k, 0, n - 1}] -
12*Sum[(k - 2)*a[k][t]*a[n - k][t]*D[f[t], t], {k, 1, n - 1}],
a[n][t]]
This gives $a_{1}(t)=0$. To compute the next term $a_{2}(t)$ I manually update the value of $n$ to $n=2$ and add the value of $a_{1}(t)$ together with $a_{0}(t)$.
n=2;
a[0][t]=1;
a[1][t]=0;
Solve[(n + 1) (n - 4) (6 - n)*a[n][t]*D[f[t], t] ==
-(n - 3) (n - 4)*D[a[n - 1][t], t] +
12*Sum[D[a[k][t], t]*a[n - 1 - k][t], {k, 0, n - 1}] -
12*Sum[(k - 2)*a[k][t]*a[n - k][t]*D[f[t], t], {k, 1, n - 1}],
a[n][t]]
I repeat the same procedure to find $a_{3}(t)$ and so on. This approach is quite tedious. Is there a way of generating the terms automatically instead of relying on the manual approach?
a[3]
gives you zero. There is no solution fora[4]
... recheck your equations $\endgroup$