OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..floor(k/2)} binomial(n-k-j, j).
G.f.: (1-x)*(1+x)*(1+x^2) / ( (1-x-x^4)*(1-x^2-x^4) ). - R. J. Mathar, Nov 11 2014
From G. C. Greubel, Jul 25 2022: (Start)
MATHEMATICA
a[n_]:= a[n]= Sum[Binomial[n-k-j, j], {k, 0, Floor[n/2]}, {j, 0, Floor[k/2]}];
Table[a[n], {n, 0, 40}] (* G. C. Greubel, Jul 25 2022 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x^4)/((1-x^2-x^4)*(1-x-x^4)) )); // G. C. Greubel, Jul 25 2022
(SageMath)
@CachedFunction
def A099574(n): return sum(sum(binomial(n-k-j, j) for j in (0..(k//2))) for k in (0..(n//2)))
[A099574(n) for n in (0..40)] # G. C. Greubel, Jul 25 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 23 2004
STATUS
approved