login
Expansion of (1 + x*exp(x))^2.
6

%I #26 Oct 21 2023 01:12:09

%S 1,2,6,18,56,170,492,1358,3600,9234,23060,56342,135192,319514,745500,

%T 1720350,3932192,8912930,20054052,44826662,99614760,220201002,

%U 484442156,1061158958,2315255856,5033164850,10905190452,23555211318,50734301240,108984795194

%N Expansion of (1 + x*exp(x))^2.

%H T. D. Noe, <a href="/A002999/b002999.txt">Table of n, a(n) for n = 0..500</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (8,-25,38,-28,8)

%F From _Ralf Stephan_, Sep 02 2003: (Start)

%F a(0) = 1, a(n) = (n^2 - n)*2^n/4 + 2*n.

%F a(n) = A003013(n) + n = A001815(n) + 2*n. (End)

%F G.f.: 1+(2x(7x^3-10x^2+5x-1))/((x-1)^2 (2x-1)^3). - _Harvey P. Dale_, Apr 04 2011

%t CoefficientList[Series[1+(2x(7x^3-10x^2+5x-1))/((x-1)^2 (2x-1)^3), {x,0,30}],x] (* _Harvey P. Dale_, Apr 04 2011 *)

%t Table[If[n == 0, 1, (n^2 - n) 2^n/4 + 2*n], {n, 0, 30}] (* _T. D. Noe_, Apr 04 2011 *)

%Y Cf. A048482, A001787, A005183.

%Y Cf. A003013, A001815.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_