OFFSET
0,3
FORMULA
a(n) = 2^n - cos(Pi*n/3) - 3^(n/2)*sin(Pi*n/6)/sqrt(3).
O.g.f.: -x(1-3x+3x^2+x^3)/[(2x-1)(x^2-x+1)(3x^2-3x+1)]. - R. J. Mathar, Apr 02 2008
MATHEMATICA
Table[Sum[Binomial[n, k] * Mod[k*Floor[3*(k+1)/2] - 2*k, 3], {k, 0, n}], {n, 0, 40}] (* Vaclav Kotesovec, Oct 30 2017 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 06 2003
STATUS
approved