I have stumbled upon a sequence (0,1,4,15,64...) as the solution to a computer science problem I have been studying. The sequence is known and is given by a(n) = n(a(n-1) + 1), a(0) = 0. My question is whether or not it is appropriate to prove this by induction and how can I re-write this expression to contain factorials so that I can make a proof about its O(n) complexity.
Asked
Active
Viewed 57 times
1 Answers
0
You can easily show (by repeatedly recursing or induction) that for $n\geq 1$ $$a_n=n!\sum_{i=0}^{n-1}\frac 1 {i!}=\lfloor en!\rfloor-1$$
A.S.
- 4,004
-
what does [en!] mean? – IntegrateThis Oct 10 '15 at 20:26
-
Floor (largest integer no greater than) of $e\cdot n!$ – A.S. Oct 10 '15 at 20:27