OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (5,-8,2,6,-4,-1,1).
FORMULA
From Andrew Howroyd, Aug 10 2018: (Start)
a(n) = 5*a(n-1) - 8*a(n-2) + 2*a(n-3) + 6*a(n-4) - 4*a(n-5) - a(n-6) + a(n-7).
G.f.: x*(1 - 2*x + 2*x^2 - 5*x^3 + 5*x^4)/((1 - x)^3*(1 - x - x^2)^2). (End)
EXAMPLE
a(4) = 18 = 3 + 4 + 5 + 6.
MATHEMATICA
Table[n*Fibonacci[n]+Binomial[n, 2], {n, 36}] (* James C. McMahon, Mar 09 2025 *)
LinearRecurrence[{5, -8, 2, 6, -4, -1, 1}, {1, 3, 9, 18, 35, 63, 112}, 40] (* Harvey P. Dale, Jan 24 2026 *)
PROG
(PARI) a(n) = n*fibonacci(n) + binomial(n, 2); \\ Andrew Howroyd, Aug 10 2018
(PARI) Vec((1 - 2*x + 2*x^2 - 5*x^3 + 5*x^4)/((1 - x)^3*(1 - x - x^2)^2) + O(x^40)) \\ Andrew Howroyd, Aug 10 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Sep 05 2007
EXTENSIONS
Name changed and terms a(11) and beyond from Andrew Howroyd, Aug 10 2018
STATUS
approved
