A360705 Expansion of Sum_{k>=0} (x * (1 + (-1)^k * x))^k.
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
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)
Programs
-
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]);
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