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

A102561
a(n) = 2^floor(n/2)*((-1)^floor(n/2) + (-1)^n)/2.
2
1, 0, 0, -2, 4, 0, 0, -8, 16, 0, 0, -32, 64, 0, 0, -128, 256, 0, 0, -512, 1024, 0, 0, -2048, 4096, 0, 0, -8192, 16384, 0, 0, -32768, 65536, 0, 0, -131072, 262144, 0, 0, -524288, 1048576, 0, 0, -2097152, 4194304, 0, 0, -8388608, 16777216, 0, 0, -33554432, 67108864, 0, 0, -134217728
OFFSET
0,4
FORMULA
a(n) = ((-2)^floor(n/2) + (-1)^n*2^floor(n/2))/2.
a(n) = A102560(n)*2^floor(n/2).
a(n) = 4*a(n-4). - Georg Fischer, Sep 02 2021
MATHEMATICA
LinearRecurrence[{0, 0, 0, 4}, {1, 0, 0, -2}, 64] (* Georg Fischer, Sep 02 2021 *)
PROG
(Magma) &cat [[4^n, 0, 0, -2*4^n]: n in [0..20]]; // G. C. Greubel, Sep 15 2023
(SageMath) [((-2)^(n//2) + (-1)^n*2^(n//2))/2 for n in range(41)] # G. C. Greubel, Sep 15 2023
CROSSREFS
Cf. A102560.
Sequence in context: A309244 A378518 A004025 * A072068 A078145 A348892
KEYWORD
easy,sign
AUTHOR
Paul Barry, Jan 14 2005
STATUS
approved