login
Coefficient of x^n in expansion of (1 - n*x - n*x^2)^n.
3

%I #24 May 12 2021 03:07:18

%S 1,-1,0,27,-416,5625,-74304,924385,-8626176,-48361131,7124800000,

%T -340421390199,13686496542720,-522760216822129,19658830846298112,

%U -735037915447265625,27218267709730979840,-980444996625142158435,32830565919734078521344,-889052809376495994642527

%N Coefficient of x^n in expansion of (1 - n*x - n*x^2)^n.

%C Also coefficient of x^n in the expansion of 1/sqrt(1 + 2*n*x + n*(n+4)*x^2).

%H Seiichi Manyama, <a href="/A307911/b307911.txt">Table of n, a(n) for n = 0..386</a>

%F a(n) = Sum_{k=0..floor(n/2)} (-n)^(n-k) * binomial(n,k) * binomial(n-k,k) = Sum_{k=0..floor(n/2)} (-n)^(n-k) * binomial(n,2*k) * binomial(2*k,k).

%F For n>0, a(n) = (-n)^n * Hypergeometric2F1(1/2 - n/2, -n/2, 1, -4/n). - _Vaclav Kotesovec_, May 12 2021

%t a[0] = 1; a[n_] := Sum[(-n)^(n-k) * Binomial[n, 2*k] * Binomial[2*k, k], {k, 0, Floor[n/2]}]; Array[a, 20, 0] // Flatten (* _Amiram Eldar_, May 12 2021 *)

%t Join[{1}, Table[(-n)^n*Hypergeometric2F1[1/2 - n/2, -n/2, 1, -4/n], {n, 1, 20}]] (* _Vaclav Kotesovec_, May 12 2021 *)

%o (PARI) {a(n) = polcoef((1-n*x-n*x^2)^n, n)}

%o (PARI) {a(n) = sum(k=0, n\2, (-n)^(n-k)*binomial(n, k)*binomial(n-k, k))}

%o (PARI) {a(n) = sum(k=0, n\2, (-n)^(n-k)*binomial(n, 2*k)*binomial(2*k, k))}

%Y Main diagonal of A307819.

%Y Cf. A092366, A307862.

%K sign

%O 0,4

%A _Seiichi Manyama_, May 05 2019