OFFSET
1,2
COMMENTS
a(n)/a(n-1) tends to phi; e.g., a(10)/a(9) = 178/109 = 1.633...
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-1,-1)
FORMULA
From Andrew Howroyd, Sep 01 2018: (Start)
a(n) = 2*Fibonacci(n+1) - (1 - (-1)^n)/2.
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4) for n > 4.
G.f.: x*(1 + 3*x - x^2 - 2*x^3)/((1 - x)*(1 + x)*(1 - x - x^2)).
(End)
EXAMPLE
a(4) = 10 = sum of row 4 terms of triangle A131779: (3 + 1 + 5 + 1).
MATHEMATICA
LinearRecurrence[{1, 2, -1, -1}, {1, 4, 5, 10}, 40] (* or *) CoefficientList[ Series[(1+3*x-x^2-2*x^3)/(1-x-2*x^2+x^3+x^4), {x, 0, 40}], x] (* Harvey P. Dale, Aug 27 2021 *)
PROG
(PARI) a(n) = 2*fibonacci(n+1) - (1 - (-1)^n)/2; \\ Andrew Howroyd, Sep 01 2018
(PARI) Vec((1 + 3*x - x^2 - 2*x^3)/((1 - x)*(1 + x)*(1 - x - x^2)) + O(x^40)) \\ Andrew Howroyd, Sep 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jul 14 2007
EXTENSIONS
Terms a(11) and beyond from Andrew Howroyd, Sep 01 2018
STATUS
approved