OFFSET
0,2
COMMENTS
Also the number of binary words with 3n 1's and 3 0's such that for every prefix the number of 1's is >= the number of 0's. The a(1) = 5 words are: 101010, 101100, 110010, 110100, 111000.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Wikipedia, Young tableau
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: (2*x^3-8*x^2+28*x+5)*x/(x-1)^4.
a(n) = (3*n-2)*(3*n+2)*(n+1) for n>0, a(0) = 0.
MAPLE
a:= n-> max(0, (3*n-2)*(3*n+2)*(n+1)/2):
seq(a(n), n=0..40);
MATHEMATICA
LinearRecurrence[{4, -6, 4, -1}, {0, 5, 48, 154, 350}, 50] (* Harvey P. Dale, Dec 16 2017 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -1, 4, -6, 4]^n*[0; 5; 48; 154])[1, 1] \\ Charles R Greathouse IV, Oct 18 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Aug 15 2012
STATUS
approved