OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
W. Kuszmaul, Fast Algorithms for Finding Pattern Avoiders and Counting Pattern Occurrences in Permutations, arXiv preprint arXiv:1509.08216 [cs.DM], 2015-2017.
Index entries for linear recurrences with constant coefficients, signature (4,-5,1,2,-1).
FORMULA
a(n) = (1 - 2*sqrt(5)/5)*(sqrt(5)/2 - 1/2)^n*(-1)^n + (sqrt(5)/2 + 1/2)^n*(2*sqrt(5)/5 + 1) + (n^2 + n - 2)/2.
G.f.: (x^3 + x - 1)/((1-x)^3*(x^2 + x - 1)).
a(n) = 4*a(n-1) - 5*a(n-2) + a(n-3) + 2*a(n-4) - a(n-5); a(0)=1, a(1)=3, a(2)=7, a(3)=13, a(4)=22. - Harvey P. Dale, Nov 19 2011
E.g.f.: exp(x)*(x^2 + 2*x - 2)/2 + 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 2*sqrt(5)*sinh(sqrt(5)*x/2))/5. - Stefano Spezia, Feb 13 2023
MATHEMATICA
Accumulate[Table[Total[{n, Fibonacci[n+1]}], {n, 0, 40}]] (* or *) LinearRecurrence[ {4, -5, 1, 2, -1}, {1, 3, 7, 13, 22}, 41] (* Harvey P. Dale, Nov 19 2011 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 26 2003
STATUS
approved