Well, you can always use the theory of difference equations (recurrence relations). You can find the nth term of the Fibonacci sequence this way, and I'm sure your S(n) sequence can be found the same way. The theory is very similar to that of differential equations.