login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A360705
Expansion of Sum_{k>=0} (x * (1 + (-1)^k * x))^k.
2
1, 1, 0, 3, -1, 8, 1, 21, 0, 55, -1, 144, 1, 377, 0, 987, -1, 2584, 1, 6765, 0, 17711, -1, 46368, 1, 121393, 0, 317811, -1, 832040, 1, 2178309, 0, 5702887, -1, 14930352, 1, 39088169, 0, 102334155, -1, 267914296, 1, 701408733, 0, 1836311903, -1, 4807526976, 1
OFFSET
0,4
FORMULA
a(n) = Sum_{k=0..floor(n/2)} (-1)^(k*(n-k)) * binomial(n-k,k).
a(2*n) = A057078(n), a(2*n+1) = A000045(2*n+2).
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