OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-1,0,-1,-1).
FORMULA
G.f.: (1+x)*(1-x+x^2)/((1-x-x^2)*(1-x^2-x^4)).
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-5) - a(n-6).
a(n) = Sum_{k=0..n} ( F(k+1) - F((k+1)/2)*(1-(-1)^k)/2 ).
EXAMPLE
1 = 1.
1 = 1.
1 + 2 = 3.
2 + 3 = 5.
2 + 3 + 5 = 10.
3 + 5 + 8 = 16.
3 + 5 + 8 + 13 = 29.
5 + 8 + 13 + 21 = 47.
5 + 8 + 13 + 21 + 34 = 81.
8 + 13 + 21 + 34 + 55 = 131.
8 + 13 + 21 + 34 + 55 + 89 = 220.
MATHEMATICA
a[n_]:= Sum[Fibonacci@k, {k, Floor[(n + 3)/2], n + 1}]; Array[a, 33, 0] (* Robert G. Wilson v, Mar 15 2011 *)
Table[Sum[Fibonacci[n - i + 2], {i, Floor[(n + 2)/2]}], {n, 0, 50}] (* Wesley Ivan Hurt, Feb 25 2014 *)
LinearRecurrence[{1, 2, -1, 0, -1, -1}, {1, 1, 3, 5, 10, 16}, 40] (* Harvey P. Dale, Feb 02 2019 *)
PROG
(Magma) I:=[1, 1, 3, 5, 10, 16]; [n le 6 select I[n] else Self(n-1) +2*Self(n-2)-Self(n-3)-Self(n-5)-Self(n-6): n in [1..50]]; // Vincenzo Librandi, Mar 01 2014
(PARI) Vec( (1+x)*(1-x+x^2)/((1-x-x^2)*(1-x^2-x^4)) +O(x^66) ) \\ Joerg Arndt, Mar 01 2014
(SageMath) [sum(fibonacci(n-j+2) for j in range(1, 2+(n//2))) for n in range(51)] # G. C. Greubel, Jan 31 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Apr 11 2007
EXTENSIONS
More terms from Vincenzo Librandi, Mar 01 2014
STATUS
approved