OFFSET
0,3
COMMENTS
In general, the sum of a second-order sequence with signature (a,b) and a third-order sequence with signature (x,y,z) will be a fifth-order sequence with signature (a+x,-x*a+b+y, -y*a+z-b*x,-a*z-b*y,-b*z). In this instance, a=b=x=y=z=1 resulting in a signature of (2,1,-1,-2,-1).
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,1,-1,-2,-1).
FORMULA
a(n) = 2*a(n-1) + a(n-2) - a(n-3) - 2*a(n-4) - a(n-5) for n > 4 with a(0)=0, a(1)=1, a(2)=2, a(3)=3, a(4)=5.
G.f.: x*(1 - 2*x^2 - 2*x^3)/(1 - 2*x - x^2 + x^3 + 2*x^4 + x^5). - Stefano Spezia, Oct 15 2020
MATHEMATICA
LinearRecurrence[{2, 1, -1, -2, -1}, {0, 1, 2, 3, 5}, 50] (* Amiram Eldar, Oct 15 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary Detlefs, Oct 15 2020
STATUS
approved