OFFSET
1,4
COMMENTS
a(n) is the sum of the alternating series of central binomial coefficients (including all rows, defined as binomial(m,floor(m/2)) or equivalently binomial(m,ceiling(m/2)) for all m odd, A001405).
LINKS
Robert Israel, Table of n, a(n) for n = 1..3326
FORMULA
a(n) = Sum_{k=1..n-1} ((-1)^(k+n+1)*binomial(k,floor(k/2))).
From Robert Israel, Oct 08 2020: (Start)
D-finite with recurrence: (4*n - 8)*a(n - 3) + (-6 + 4*n)*a(n - 2) + (-n + 2)*a(n - 1) - n*a(n) = 0.
G.f. (sqrt((1+2*x)/(1-2*x))-1-2*x)/(2+2*x). (End)
MAPLE
f:= gfun:-rectoproc({(4*n + 4)*a(n) + (6 + 4*n)*a(n + 1) + (-n - 1)*a(n + 2) + (-n - 3)*a(n + 3), a(0) = 0, a(1) = 0, a(2) = 1, a(3) = 1}, a(n), remember):
map(f, [$1..100]); # Robert Israel, Oct 08 2020
MATHEMATICA
Sum[(-1)^(k + n + 1) Binomial[k, Floor[k/2]], {k, 1, -1 + n}]
PROG
(PARI) a(n) = sum(k=1, n-1, (-1)^(k+n+1)*binomial(k, k\2)); \\ Michel Marcus, Feb 22 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Brian P Hawkins, Feb 22 2020
STATUS
approved