login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A084056
a(n) = -a(n-1) + a(n-2) + a(n-3), with a(0)=0, a(1)=1, a(2)=-3.
5
0, 1, -3, 4, -6, 7, -9, 10, -12, 13, -15, 16, -18, 19, -21, 22, -24, 25, -27, 28, -30, 31, -33, 34, -36, 37, -39, 40, -42, 43, -45, 46, -48, 49, -51, 52, -54, 55, -57, 58, -60, 61, -63, 64, -66, 67, -69, 70, -72, 73, -75, 76, -78, 79, -81, 82, -84, 85, -87, 88, -90
OFFSET
0,3
FORMULA
a(n) = (1/4) * ((1-6*n) * (-1)^n - 1).
G.f.: (x-2*x^2)/((1+x)*(1-x^2)).
a(n) = 2*a(n-2) - a(n-4) = -(-1)^n * A032766(n) = A001057(n) - 2*A001057(n-1). - Ralf Stephan, Aug 18 2013
a(n) = (2n - 1 - floor((n-1)/2)) * (-1)^(n-1). - Wesley Ivan Hurt, Nov 10 2013
MAPLE
A084056:=n->((1-6*n) * (-1)^n - 1)/4; seq(A084056(n), n=0..100); # Wesley Ivan Hurt, Nov 10 2013
MATHEMATICA
Table[((1 - 6n)(-1)^n - 1)/4, {n, 0, 100}] (* Wesley Ivan Hurt, Nov 10 2013 *)
LinearRecurrence[{-1, 1, 1}, {0, 1, -3}, 101] (* T. D. Noe, Nov 11 2013 *)
PROG
(Magma) [((1-6*n)*(-1)^n-1)/4 : n in [0..100]]; // Zaki Khandaker, Jun 21 2015
(PARI) concat(0, Vec(x*(2*x-1)/((x-1)*(x+1)^2) + O(x^100))) \\ Colin Barker, Jun 21 2015
CROSSREFS
Cf. A032766 (absolute values).
Sequence in context: A185543 A026322 A049624 * A032766 A189935 A329987
KEYWORD
easy,sign
AUTHOR
Paul Barry, May 09 2003
EXTENSIONS
Definition fixed by Ralf Stephan, Aug 18 2013
STATUS
approved