New answers tagged

2 votes

Speed up calculation of recursively defined list

a[i_] = i; b[i_] = -i; RecurrenceTable[{θ[i] == a[i] θ[i - 1] - b[i - 1]^2 θ[i - 2], θ[0] == 1, θ[1] == a[1]}, θ, {i, 1, 1000}]
  • 45.7k
3 votes

Speed up calculation of recursively defined list

A common approach to speed recursive calculations like this is memoization. In Mathematica, this can be as simple as using the ...

Top 50 recent answers are included