OFFSET
0,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
Conjecture: G.f.: -(1/2)*z*(2*z+(1-4*z^2)^(1/2)+1)/(1-4*z^2)^(1/2)/(z^2-1). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009
From G. C. Greubel, Apr 30 2021: (Start)
a(n) = (1 + (-1)^n)/2 + Sum_{j=0..floor((n-1)/2)} Sum_{k=0..j} (n-2*j)*binomial(n -2*k, n-k-j)/(n-2*k).
a(n) = Sum_{j=0..floor(n/2)} Sum_{k=0..j} ((n-2*j)/(n-k-j))*binomial(n-2*k, n-k-j). (End)
MATHEMATICA
a[_, 0]=1; a[n_, n_]=1; a[n_, m_]:= a[n, m] = a[n-1, m] + a[n, m-1]; a[n_, m_] /; n<0 || m>n = 0; Table[ Sum[a[n-m, m], {m, 0, n}], {n, 0, 45}] (* Jean-François Alcover, Dec 17 2012 *)
a[n_]:= a[n]= (1+(-1)^n)/2 + Sum[(n-2*j)*Binomial[n-2*k, n-k-j]/(n-2*k), {j, 0, (n-1)/2}, {k, 0, j}]; Table[a[n], {n, 0, 45}] (* G. C. Greubel, Apr 30 2021 *)
PROG
(Magma)
a:= func< n | n eq 0 select 1 else (1+(-1)^n)/2 + (&+[ (&+[ ((n-2*j)/(n-2*k))*Binomial(n-2*k, n-k-j) : k in [0..j]]) : j in [0..Floor((n-1)/2)]]) >;
[a(n): n in [0..45]]; // G. C. Greubel, Apr 30 2021
(Sage)
def a(n): return (1+(-1)^n)/2 + sum( sum( ((n-2*j)/(n-2*k))*binomial(n-2*k, n-k-j) for k in (0..j)) for j in (0..(n-1)//2))
[a(n) for n in (0..45)] # G. C. Greubel, Apr 30 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Gerald McGarvey, Dec 21 2006
EXTENSIONS
Offset changed by Reinhard Zumkeller, Jul 12 2012
Terms a(18) onward added by G. C. Greubel, Apr 30 2021
STATUS
approved