OFFSET
2,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 2..1000
Index entries for linear recurrences with constant coefficients, signature (3,0,-5,0,3,1).
FORMULA
a(n) = t(n-1)*f(n) - t(n)*f(n-1), where t(n) = n(n+1)/2 and f(n) = f(n-1) + f(n-2) with f(1)=f(2)=1.
From Chai Wah Wu, May 29 2016: (Start)
a(n) = 3*a(n-1) - 5*a(n-3) + 3*a(n-5) + a(n-6) for n>7.
G.f.: x^2*(2 - 6*x + 2*x^2 - x^3)/(x^2 + x - 1)^3. (End)
EXAMPLE
a(5) = t(4)*f(5)-t(5)*f(4) = 10*5-15*3 = 50-45 = 5.
MATHEMATICA
LinearRecurrence[{3, 0, -5, 0, 3, 1}, {-2, 0, -2, 5, 15, 49}, 50] (* G. C. Greubel, May 29 2016 *)
PROG
(PARI) t(n) = n*(n+1)/2 \\ A000217
f(n) = if (n==1, 1, if (n==2, 1, f(n-1)+f(n-2))) \\ A000045
det(n) = t(n-1)*f(n)-t(n)*f(n-1) \\ Michel Marcus, Jun 19 2013
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Patrick J. Costello (pat.costello(AT)eku.edu), Jan 19 2006
EXTENSIONS
More terms from Michel Marcus, Jun 19 2013
STATUS
approved