Memoization

sympy.utilities.memoization.assoc_recurrence_memo(base_seq)

Memo decorator for associated sequences defined by recurrence starting from base

base_seq(n) – callable to get base sequence elements

XXX works only for Pn0 = base_seq(0) cases XXX works only for m <= n cases

sympy.utilities.memoization.recurrence_memo(initial)

Memo decorator for sequences defined by recurrence

See usage examples e.g. in the specfun/combinatorial module