login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A071646
Number of base 4 n-digit numbers with digit sum n.
0
1, 2, 6, 19, 61, 201, 672, 2269, 7723, 26452, 91058, 314766, 1091884, 3798900, 13251136, 46325285, 162268775, 569385098, 2001012474, 7042014879, 24813529581, 87533417037, 309107111536, 1092585807044, 3865270781236
OFFSET
1,2
FORMULA
a(n)=[x^n] (1+x+x^2+x^3)^n-(1+x+x^2+x^3)^(n-1). - Michael Somos, Jul 19 2002
a(n)*790*(2*n^2-n) = a(n-1)*(-16328*n^4+137200*n^3-400977*n^2+489925*n-207450)+a(n-2)*(44902*n^4-399751*n^3+1267117*n^2-1672482*n+769980)+a(n-3)*4*(n-3)*(8164*n^3-52272*n^2+115397*n-81223)+a(n-4)*16*(n-4)*(n-3)*(4082*n^2-11849*n+8529), n>2. - Michael Somos, Jul 19 2002
a(n) = sum(k=1..n, (sum(j=0..k, binomial(j,n-3*k+2*j) *binomial(k,j))) *binomial(n-1,n-k)). [Vladimir Kruchinin, Nov 07 2013]
PROG
(PARI) a(n)=local(y=(x^4-1)/(x-1)); if(n<0, 0, polcoeff(y^n-y^(n-1), n))
(Maxima) a(n):=sum((sum(binomial(j, n-3*k+2*j)*binomial(k, j), j, 0, k))*binomial(n-1, n-k), k, 1, n); /* Vladimir Kruchinin, Nov 07 2013 */
CROSSREFS
Sequence in context: A275943 A228180 A035929 * A114627 A289591 A148464
KEYWORD
nonn,base
AUTHOR
John W. Layman, Jun 22 2002
STATUS
approved