Recursionhard
0:00.0

The recurrence an=an1+n!a_n = a_{n-1} + n! with a0=0a_0 = 0 generates the sequence of partial sums of factorials: an=i=1ni!a_n = \sum_{i=1}^{n} i!. Compute a5=1!+2!+3!+4!+5!a_5 = 1! + 2! + 3! + 4! + 5!.