Hmm... you all do not care about f(n). You are just trying to sum up all the combinations that is <= n.
So for s(10)...
1+2+3 <= 10 yields 2^3-1 = 7 combinations.
What is the equation then for adding 5 and 8?
Adding 5 means 2^4-1 combinations but 2^3-1 have already been used so we have (2^4-1) - (2^3-1) = 8 How do you determine how many are over 10 with an equation?
{ 5, 5+3, 5+2, 5+1, 5+3+2, 5+3+1, 5+2+1 } = 7
Seems he is leading to s(10) = 2^3-1 + s(10-5) + s(10-8)
s(5) : 1+2 <= 5 : 2^2-1 + s(5-3) + s(5-5)
s(2) : 1 < 2 : 2^1-1 + s(2-2)
if...
2^2-1 = { 5+2+1, 5+2, 5+1 }
s(5-3)
....2^1-1 = { 5+3+1 }
....s(2-2) = { 5+3+2 }
s(5-5) = { 5+3 }
then where is the { 5 } ?
And since s(2) = 2 how does s(10-8) = 3 for the three combinations with 8?
It is looking like 2^3 - 1 + s(10-5) + 1 + s(10-8) + 1
Since s(10-5) actually covers all the combinations of 5 with 1+2+3 but doesn't include 5 by itself.
Same with s(10-8) covers the combinations of 1+2 that can go with 8 but not 8 by itself.