OFFSET
1,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2000
Index entries for linear recurrences with constant coefficients, signature (0,1,1,0,-1).
FORMULA
From Michael Somos, Aug 07 2005: (Start)
G.f.: x^2*(1+2*x+2*x^2)/((1-x^2)*(1-x^3)).
a(-n) = -2-a(n-1). (End)
a(n) = a(n-2)+a(n-3)-a(n-5). - Wesley Ivan Hurt, Jan 27 2022
Sum_{n>=2} (-1)^n/a(n) = sqrt(2*(1-1/sqrt(5)))*Pi/10 + log(phi)/sqrt(5), where phi is the golden ratio (A001622). - Amiram Eldar, Mar 30 2023
MAPLE
seq(floor(n/2) + floor(n/3), n=1..64);
MATHEMATICA
Table[Floor[n/2] + Floor[n/3], {n, 100}] (* Wesley Ivan Hurt, Feb 21 2014 *)
LinearRecurrence[{0, 1, 1, 0, -1}, {0, 1, 2, 3, 3}, 80] (* Harvey P. Dale, May 05 2018 *)
PROG
(PARI) a(n)=n\2+n\3
(Magma) [Floor (n/2)+Floor(n/3): n in [0..100]]; // Vincenzo Librandi, Feb 22 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved