OFFSET
0,4
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
a(n) = sum{k=0..n, if (mod(kn, 3)=0, 1, 0) }.
a(n) = floor(n/3)(5/3+4/3cos(2Pi*/3))+1.
a(n) = 2*a(n-3)-a(n-6) for n>5. - Colin Barker, May 02 2015
G.f.: (2*x^3+x^2+x+1) / ((x-1)^2*(x^2+x+1)^2). - Colin Barker, May 02 2015
PROG
(PARI) Vec((2*x^3+x^2+x+1)/((x-1)^2*(x^2+x+1)^2) + O(x^100)) \\ Colin Barker, May 02 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 11 2003
STATUS
approved