OFFSET
0,4
LINKS
Winston de Greef, Table of n, a(n) for n = 0..4762
Index entries for linear recurrences with constant coefficients, signature (0,2,0,1,0,2,0,-1)
FORMULA
a(n) = Sum_{k=0..floor(n/2)} (-1)^(k*(n-k)) * binomial(n-k,k).
G.f.: ( 1+x+x^3-2*x^4+x^5+x^6-2*x^2 ) / ( (x^2-x-1)*(x^2+x-1)*(1+x+x^2)*(x^2-x+1) ). - R. J. Mathar, Mar 12 2023
PROG
(PARI) my(N=50, x='x+O('x^N)); Vec(sum(k=0, N, (x*(1+(-1)^k*x))^k))
(PARI) a(n) = sum(k=0, n\2, (-1)^(k*(n-k))*binomial(n-k, k));
(PARI) a(n) = if(n%2, fibonacci(n+1), [1, 0, -1][n/2%3+1]);
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Seiichi Manyama, Feb 17 2023
STATUS
approved