OFFSET
1,9
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,-1,0,1).
FORMULA
a(3-n) = A053602(n).
From Michael Somos: (Start)
G.f.: x*(1 + x + x^2 + 2*x^3)/(1 + x^2 - x^4).
a(n) = -a(n-2) + a(n-4). (End)
a(n) = b(n-1) + b(n-2) + b(n-3) + 2*b(n-4), where b(n) = i^n * A079977(n). - G. C. Greubel, Dec 06 2022
MATHEMATICA
LinearRecurrence[{0, -1, 0, 1}, {1, 1, 0, 1}, 60] (* Harvey P. Dale, May 08 2017 *)
PROG
(PARI) a(n)=fibonacci((3-n)\2+(3-n)%2*2)
(Sage)
def A051792():
x, y, b = 1, 1, true
while True:
yield x
x, y = y, x - y
y = -y if b else y
b = not b
a = A051792()
print([next(a) for _ in range(51)]) # Peter Luschny, Mar 19 2020
(Magma) [Fibonacci(1 -Floor((n-4)/2) -2*((n-4) mod 2)): n in [1..60]]; // G. C. Greubel, Dec 06 2022
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 10 1999
STATUS
approved