OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{m = 1 .. ceiling(n/2)} (-1)^(m+1)* binomial(n, m), n >= 1.
a(2*k+1) = (1 - (-1)^(k+1)*A001791(k)), k >= 0.
a(2*k) = (1 - (-1)^k*A001700(k-1)), k >= 1.
O.g.f. for a(2*k+1), k >= 0: (2+3*x - (1-x)*(1+2*x)*c(-x))/((1+4*x)*(1-x)), with the o.g.f. c(x) of A000108 (Catalan).
O.g.f. for a(2*(k+1)), k >= 0:
(3+2*x - (1-x)*c(-x))/((1+4*x)*(1-x)).
O.g.f. for a(n), n >= 1:
x*((1+x)*(2+x+2*x^2) - (1+x+2*x^2)*(1-x^2)*c(-x^2))/((1+4*x^2)*(1-x^2)).
MATHEMATICA
Table[Sum[(-1)^(m+1)*Binomial[n, m], {m, Ceiling[n/2]}], {n, 50}] (* Paolo Xausa, Nov 14 2024 *)
PROG
(Haskell)
a258144 = sum . zipWith (*) (cycle [1, -1]) . a257241_row
-- Reinhard Zumkeller, May 22 2015
CROSSREFS
KEYWORD
sign,easy,changed
AUTHOR
Wolfdieter Lang, May 22 2015
STATUS
approved