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”).

A166978
a(n) = 4*( 1-(-1)^n) -2^n.
1
-1, 6, -4, 0, -16, -24, -64, -120, -256, -504, -1024, -2040, -4096, -8184, -16384, -32760, -65536, -131064, -262144, -524280, -1048576, -2097144, -4194304, -8388600, -16777216, -33554424, -67108864, -134217720, -268435456, -536870904, -1073741824, -2147483640
OFFSET
0,2
FORMULA
a(n) = A166956(n+1)-3*A166956(n).
a(2n) = -A000302(n). a(2n+1) = 6*(-1)^n*A084240(n).
a(n+1) - 2*a(n) = 4*( 3*(-1)^n-1) = 8 *(-1)^n*A000034(n).
G.f.: -(5*x-1)*(3*x-1) / ( (x-1)*(2*x-1)*(1+x) ). - R. J. Mathar, Jul 01 2011
E.g.f.: 8*sinh(x) - exp(2*x). - G. C. Greubel, May 30 2016
MATHEMATICA
LinearRecurrence[{2, 1, -2}, {-1, 6, -4}, 50] (* or *) Table[4*(1-(-1)^n) - 2^n, {n, 0, 25}] (* G. C. Greubel, May 30 2016 *)
PROG
(Magma) [4*( 1-(-1)^n) -2^n: n in [0..40] ]; // Vincenzo Librandi, Aug 06 2011
CROSSREFS
Sequence in context: A331421 A197581 A323525 * A356547 A365956 A365953
KEYWORD
easy,sign
AUTHOR
Paul Curtz, Oct 26 2009
STATUS
approved