令a=x+y,b=-xy
We have S(n+1)=(x+y)S(n)-xyS(n-1)
S(n+1)-xS(n)=y(S(n)-xS(n-1)=...=y^n(S(1)-xS(0))
S(n+1)-yS(n)=...................=x^n(S(1)-yS(0)
(x-y)S(n)=(x^n-y^n)S(1)+(xy^n-yx^n)S(0)
S(n)=(x^n-y^n)/(x-y)S(1) + b(x^(n-1)-y^(n-1))/(x-y)S(0)
These formula are better. Mr.123's skill is good, but ...,this Q should be two parts.
Last week,The founder of Recursive Function in China Prof.Mo passed away at his 94,I miss him.