Before I get started, let me say for complete disclosure this question came up while I was solving a problem from https://projecteuler.net/.

I've been trying to find a non-recursive representation of the following function- $$ S(n) = \sum_{i=1}^{n} \frac{S(n-i)-1}{i!} $$

And I have not been able to find a method that works.

Can anyone help by showing me a method (or an article or anything similar) to solve this type of recurrence relation?

Edit- as pointed out in the comments, the initial value is S(0)=0

Thanks in advance :)