Work out recurrence relation solver instantly with clear inputs, formula shown and shareable results.
A first-order linear recurrence T(n) = a·T(n−1) + b has the closed form aⁿT(0) + b(aⁿ − 1)/(a − 1), found by unrolling the recursion and summing a geometric series. When a = 1 the growth is linear instead.
Closed form
T(n) = aⁿ·T(0) + b·(aⁿ − 1)/(a − 1) for a ≠ 1
T(10) = 1024 + 3 × 1023 = 4093, which the direct iteration confirms.
The aⁿ factor dominates, so the recursion multiplies rather than adds — the reason naive recursive Fibonacci is so slow.