login
A360232
G.f. Sum_{n>=0} a(n)*x^n = Sum_{n>=0} (1 + n*x + x^2)^n * x^n.
2
1, 1, 2, 6, 16, 51, 172, 626, 2409, 9791, 41671, 185224, 855865, 4100761, 20314349, 103827684, 546388333, 2955518901, 16407286272, 93350267922, 543674327227, 3237568471183, 19693508812475, 122249256779882, 773797772369256, 4990290667614087, 32766888950422831
OFFSET
0,3
LINKS
FORMULA
a(n) = Sum_{k=1..n}(Sum_{j=0..k} binomial(k,j) * binomial(j,n-k-j) * k^(2*j-n+k)). - Vaclav Kotesovec, Feb 14 2023
EXAMPLE
G.f.: A(x) = 1 + x + 2*x^2 + 6*x^3 + 16*x^4 + 51*x^5 + 172*x^6 + 626*x^7 + 2409*x^8 + 9791*x^9 + 41671*x^10 + 185224*x^11 + 855865*x^12 + ...
where
A(x) = 1 + (1 + x + x^2)*x + (1 + 2*x + x^2)^2*x^2 + (1 + 3*x + x^2)^3*x^3 + (1 + 4*x + x^2)^4*x^4 + ... + (1 + n*x + x^2)^n*x^n + ...
MATHEMATICA
nmax = 30; CoefficientList[Series[Sum[(1 + k*x + x^2)^k * x^k, {k, 0, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Feb 13 2023 *)
Flatten[{1, Table[Sum[Sum[Binomial[k, j] * Binomial[j, n-k-j] * k^(2*j - n + k), {j, 0, k}], {k, 1, n}], {n, 1, 30}]}] (* Vaclav Kotesovec, Feb 14 2023 *)
PROG
(PARI) {a(n) = polcoeff( sum(m=0, n, (1 + m*x + x^2)^m * x^m +x*O(x^n)), n)}
for(n=0, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Feb 12 2023
STATUS
approved