OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,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
KEYWORD
easy,sign
AUTHOR
Paul Barry, Jan 14 2005
STATUS
approved