OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,0,-1,1).
FORMULA
a(2*n) = A128533(n).
a(2*n+1) = A081714(n+1).
a(n+2) = A075193(n+2) - a(n).
G.f.: x*(-3+x)/((1+x-x^2)*(1+x^2)). - Colin Barker, Sep 08 2012
From G. C. Greubel, Aug 24 2025: (Start)
a(n) = (-1)^n*Fibonacci(n+2) - (-1)^floor(n/2).
E.g.f.: exp(-x/2)*(cosh(p*x) - (3/sqrt(5))*sinh(p*x)) - cos(x) - sin(x), where 2*p = sqrt(5). (End)
MATHEMATICA
Table[(-1)^n*Fibonacci[n+2] -(-1)^Floor[n/2], {n, 0, 40}] (* G. C. Greubel, Aug 24 2025 *)
PROG
(Magma)
A186679:= func< n | (-1)^n*Fibonacci(n+2) - (-1)^Floor(n/2) >;
[A186679(n): n in [0..40]]; // G. C. Greubel, Aug 24 2025
(SageMath)
def A186679(n): return (-1)**n*fibonacci(n+2) -(-1)**(n//2)
print([A186679(n) for n in range(41)]) # G. C. Greubel, Aug 24 2025
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Reinhard Zumkeller, Feb 25 2011
STATUS
approved
