OFFSET
0,3
COMMENTS
Partial sums are A129384.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: 2/(1-2*x+sqrt(1-4*x^2)) - 2*x/(1-2*x^2+sqrt(1-4*x^4)).
a(n) = binomial(n,floor(n/2)) - (1/2)*(1-(-1)^n)*binomial((n-1)/2, floor((n-1)/4)).
MATHEMATICA
A129383[n_]:= With[{B=Binomial, F=Floor}, B[n, F[n/2]] - Mod[n, 2]*B[(n- 1)/2, F[(n-1)/4]]];
Table[A129383[n], {n, 0, 40}] (* G. C. Greubel, Feb 03 2024 *)
PROG
(Magma)
A129383:= func< n | Binomial(n, Floor(n/2)) - (n mod 2)*Binomial(Floor((n-1)/2), Floor((n-1)/4)) >;
[A129383(n): n in [0..40]]; // G. C. Greubel, Feb 03 2024
(SageMath)
def A129383(n): return binomial(n, n//2) - (n%2)*binomial((n-1)/2, (n-1)//4)
[A129383(n) for n in range(41)] # G. C. Greubel, Feb 03 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 12 2007
STATUS
approved