OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,-2,1,-3,2).
FORMULA
G.f.: (1 - x^2*(1+x+x^2)/(1-x^3)^2 )/(1-2*x).
MATHEMATICA
nxt[{n_, a_}]:={n+1, 2a-Floor[(n+2)/3]}; NestList[nxt, {0, 1}, 50][[All, 2]] (* Harvey P. Dale, Aug 09 2021 *)
PROG
(PARI) {a(n)=if(n==0, 1, 2*a(n-1)-((n+1)\3))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul D. Hanna, Dec 23 2007
STATUS
approved