OFFSET
0,1
COMMENTS
Alternating sum of A017233.
LINKS
FORMULA
G.f.: 3*(2 - x)/((1 - x)*(1 + x)^2).
a(n) = -a(n-1) + a(n-2) + a(n-3).
a(n) = Sum_{k=0..n} (-1)^k*3*(3*k + 2).
a(n) = 3*((-1)^n*6*n + (-1)^n*7 + 1)/4.
Sum_{n>=0} 1/a(n) = log(3)/6 - Pi/(18*sqrt(3)) = 0.082335416765006179088425414... . - Vaclav Kotesovec, Feb 25 2016
a(n) = 3*(-1)^n*A007494(n+1). - R. J. Mathar, Jun 07 2016
EXAMPLE
a(0) = 1 + 2 + 3 = 6;
a(1) = 1 + 2 + 3 - 4 - 5 - 6 = -9;
a(2) = 1 + 2 + 3 - 4 - 5 - 6 + 7 + 8 + 9 = 15;
a(3) = 1 + 2 + 3 - 4 - 5 - 6 + 7 + 8 + 9 - 10 - 11 - 12 = -18;
a(4) = 1 + 2 + 3 - 4 - 5 - 6 + 7 + 8 + 9 - 10 - 11 - 12 + 13 + 14 + 15 = 24, etc.
MATHEMATICA
LinearRecurrence[{-1, 1, 1}, {6, -9, 15}, 53]
Table[3 ((6 (-1)^n n + 7 (-1)^n + 1)/4), {n, 0, 52}]
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Ilya Gutkovskiy, Feb 25 2016
STATUS
approved