OFFSET
0,3
COMMENTS
Lengths of lists is A047749.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
From G. C. Greubel, Oct 17 2022: (Start)
a(2*n+1) = (3*n-1)*binomial[3*n+1, n]/((n+1)*(3*n+1)).
a(2*n) = 10*binomial(3*n+1, n-1)/(2*n+3). (End)
EXAMPLE
Lists {0}, {1}, {2, 0}, {3, 1, 1}, {4, 2, 0, 2, 0, 2, 0} sum to 0, 1, 2, 5, 10.
MATHEMATICA
Plus@@@Flatten/@NestList[ # /. k_Integer :> Range[k+1, 0, -2]&, {0}, 8]
A084081[n_]:= If[EvenQ[n], 10*Binomial[(3*n+2)/2, (n-2)/2]/(n+3), 2*(3*n + 1)*Binomial[(3*n+5)/2, (n+1)/2]/((n+3)*(3*n+5))];
Table[A084081[n], {n, 40}] (* G. C. Greubel, Oct 17 2022 *)
PROG
(Magma)
F:=Floor; B:=Binomial;
function A084081(n)
if (n mod 2) eq 0 then return 10*B(F((3*n+2)/2), F((n-2)/2))/(n+3);
else return 2*(3*n+1)*B(F((3*n+5)/2), F((n+1)/2))/((n+3)*(3*n+5));
end if; return A084081;
end function;
[A084081(n): n in [0..40]]; // G. C. Greubel, Oct 17 2022
(SageMath)
def A084081(n):
if (n%2==0): return 10*binomial(int((3*n+2)/2), int((n-2)/2))/(n+3)
else: return 2*(3*n+1)*binomial(int((3*n+5)/2), int((n+1)/2))/((n+3)*(3*n+5))
[A084081(n) for n in range(40)] # G. C. Greubel, Oct 17 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Wouter Meeussen, May 11 2003
STATUS
approved