I have a system of recursive equations
x[t+1]:=f[x[t],p[t-1],a[t],a[t-1]];
p[t+1]:=g[p[t],x[t-1],a[t],a[t-1]];
a[t+1]:=h[x[t],p[t],a[t],a[t-1]];
I want to evaluate them for $t \in [0,10]$ with some initial conditions on all variables. I tried several possibilities like,
Table[{x[t+1],p[t+1],a[t+1]}, {t, 0, 10}]
or
{x[#+1],p[#+1],a[#+1]}&/@Range[0,10]
but all of them are extremely slow. The MWE of the above might be given as
x[0] := 1;
x[1] := 1;
p[0] := 2;
p[1] := 2;
a[0] := 3;
a[1] := 3;
x[t_] := 2 p[t - 1] a[t - 1] - x[t - 1] a[t - 2];
p[t_] := 5 x[t - 1] a[t - 1] - p[t - 1] a[t - 2];
a[t_] := 10 x[t - 1] p[t - 1] + a[t - 1] a[t - 2];
So commands
Table[{t + 1, x[t + 1], p[t + 1], a[t + 1]}, {t, 0, 10}]
and
{# + 1, x[# + 1], p[# + 1], a[# + 1]} & /@ Range[0, 10]
generate output
{{1, 1, 2, 3}, {2, 0.00336319, -0.00719693, 0.010203}, {3,
0.0677008, -0.0172979, 0.010203}, {4, 2.38052, -0.0540507,
0.00932697}, {5, 66.8197, 11.1562, 0.00471539}, {6, -0.518014,
1.47135, 7454.52}, {7, 21936.5, -19307.7,
27.5292}, {8, -1.64589*10^8,
1.46949*10^8, -4.23523*10^9}, {9, -1.24473*10^18,
3.48536*10^18, -2.41863*10^17}, {10, -1.68596*10^36,
1.50527*10^36, -4.33833*10^37}, {11, -1.30607*10^74,
3.65712*10^74, -2.53782*10^73}}
but very slowly. I noticed that if I calculate values for $t \in [0,2]$ and then put values as initial conditions for x[2], p[2], a[2] manually and then redo the code for $t \in [0,3]$ and repeat, it works much much faster. Is there a way to automatize it?