OFFSET
0,5
COMMENTS
A transform of the Fibonacci numbers A000045 under the Riordan array (1, x*(1-x)).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,-2,1).
FORMULA
a(n) = a(n-1) - 2*a(n-3) + a(n-4).
a(n) = Sum_{k=0..n} binomial(k, n-k)*(-1)^(n-k)*Fibonacci(k).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(-1)^k*Fibonacci(n-k).
MATHEMATICA
LinearRecurrence[{1, 0, -2, 1}, {0, 1, 0, 0}, 60] (* G. C. Greubel, Jan 01 2023 *)
CoefficientList[Series[x (1-x)/(1-x+2x^3-x^4), {x, 0, 60}], x] (* Harvey P. Dale, Mar 24 2024 *)
PROG
(Magma) I:=[0, 1, 0, 0]; [n le 4 select I[n] else Self(n-1) -2*Self(n-3) +Self(n-4): n in [1..61]]; // G. C. Greubel, Jan 01 2023
(SageMath)
@CachedFunction
def a(n): # a = A104554
if (n<4): return (0, 1, 0, 0)[n]
else: return a(n-1) - 2*a(n-3) + a(n-4)
[a(n) for n in range(61)] # G. C. Greubel, Jan 01 2023
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Mar 14 2005
STATUS
approved