cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A186925 Coefficient of x^n in (1+n*x+x^2)^n.

This page as a plain text file.
%I A186925 #62 Aug 18 2025 09:33:18
%S A186925 1,1,6,45,454,5775,88796,1602447,33213510,777665691,20302315252,
%T A186925 584774029983,18422140045596,630132567760345,23257790717110392,
%U A186925 921362075184792825,38994274473840538182,1755943506127367745795,83829045032101462204100,4229207755493569286374167
%N A186925 Coefficient of x^n in (1+n*x+x^2)^n.
%H A186925 Seiichi Manyama, <a href="/A186925/b186925.txt">Table of n, a(n) for n = 0..386</a> (terms 0..100 from Vincenzo Librandi)
%F A186925 a(n) = [x^n] (1+n*x+x^2)^n.
%F A186925 a(n) = Sum_{k=0..floor(n/2)} binomial(n, k)*binomial(n-k, n-2*k)*n^(n-2*k).
%F A186925 a(n) ~ BesselI(0,2) * n^n. - _Vaclav Kotesovec_, Apr 17 2014
%F A186925 a(n) = GegenbauerPoly(n,-n,-n/2). - _Emanuele Munarini_, Oct 20 2016
%F A186925 From _Ilya Gutkovskiy_, Sep 20 2017: (Start)
%F A186925 a(n) = [x^n] 1/sqrt((1 + 2*x - n*x)*(1 - 2*x - n*x)).
%F A186925 a(n) = n! * [x^n] exp(n*x)*BesselI(0,2*x). (End)
%F A186925 From _Seiichi Manyama_, May 01 2019: (Start)
%F A186925 a(n) = Sum_{k=0..n} (n-2)^(n-k) * binomial(n,k) * binomial(2*k,k).
%F A186925 a(n) = Sum_{k=0..n} (n+2)^(n-k) * (-1)^k * binomial(n,k) * binomial(2*k,k). (End)
%F A186925 a(n) = (1/4)^n * Sum_{k=0..n} (n-2)^k * (n+2)^(n-k) * binomial(2*k,k) * binomial(2*(n-k),n-k). - _Seiichi Manyama_, Aug 18 2025
%t A186925 Flatten[{1,Table[Sum[Binomial[n, k]*Binomial[n-k, n-2*k]*n^(n-2*k), {k,0,Floor[n/2]}],{n,1,20}]}] (* _Vaclav Kotesovec_, Apr 17 2014 *)
%t A186925 Table[GegenbauerC[n, -n, -n/2] + KroneckerDelta[n, 0], {n, 0, 100}] (* _Emanuele Munarini_, Oct 20 2016 *)
%t A186925 Table[SeriesCoefficient[(1 + n*x + x^2)^n, {x, 0, n}], {n, 0, 20}] (* _Vaclav Kotesovec_, Feb 13 2023 *)
%o A186925 (Maxima) a(n):=coeff(expand((1+n*x+x^2)^n),x,n);
%o A186925 (Maxima) makelist(ultraspherical(n,-n,-n/2),n,0,12); /* _Emanuele Munarini_, Oct 20 2016 */
%o A186925 makelist(a(n),n,0,20);
%o A186925 (Magma) P<x>:=PolynomialRing(Integers()); [ Coefficients((1+n*x+x^2)^n)[n+1]: n in [0..22] ]; // _Klaus Brockhaus_, Mar 02 2011
%o A186925 (PARI) {a(n) = sum(k=0, n, (n-2)^(n-k)*binomial(n, k)*binomial(2*k, k))} \\ _Seiichi Manyama_, May 01 2019
%o A186925 (PARI) a(n) = polcoef((1+n*x+x^2)^n, n); \\ _Michel Marcus_, May 01 2019
%Y A186925 Main diagonal of A292627.
%Y A186925 Cf. A092366, A187018, A187019, A187021, A070910, A292629.
%K A186925 nonn,easy
%O A186925 0,3
%A A186925 _Emanuele Munarini_, Mar 02 2011