%I #47 Sep 08 2022 08:44:52
%S 0,2,18,90,346,1146,3450,9722,26106,67578,169978,417786,1007610,
%T 2392058,5603322,12976122,29753338,67633146,152567802,341835770,
%U 761266170,1686110202,3716153338,8153726970,17817403386,38788923386
%N a(n) = -6 + 2^(n+1)*(3 - 2*n + n^2).
%C This sequence is a part of a class of sequences of the type: a(n) = sum(i=0,n,(C^i)*(i^k)). This sequence has C=2, k=2. Sequence A036799 has C=2, k=1. Suppose C>=2, k>=1 are integers. What is the general closed form for a(n)? - _Ctibor O. Zizka_, Feb 07 2008
%D M. Petkovsek et al., A=B, Peters, 1996, p. 97.
%D Jolley, Summation of Series, Dover (1961), p. 6.
%H Vincenzo Librandi, <a href="/A036800/b036800.txt">Table of n, a(n) for n = 0..1000</a>
%H S. Sykora, <a href="http://dx.doi.org/10.3247/SL1Math06.002">Finite and Infinite Sums of the Power Series (k^p)(x^k)</a>, DOI 10.3247/SL1Math06.002, Section V.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (7,-18,20,-8).
%F a(n) = Sum_{k=0..n} 2^k * k^2. - _Benoit Cloitre_, Jun 11 2003
%F From _R. J. Mathar_, Oct 03 2011: (Start)
%F G.f.: 2*x*(1+2*x) / ( (1-x)*(1-2*x)^3 ).
%F a(n) = 2*A036826(n). (End)
%F a(0)=0, a(1)=2, a(2)=18, a(3)=90, a(n)=7*a(n-1)-18*a(n-2)+ 20*a(n-3)- 8*a(n-4). - _Harvey P. Dale_, Jun 13 2015
%F a(n) = Sum_{k=0..n} Sum_{i=0..n} k^2 * C(k,i). - _Wesley Ivan Hurt_, Sep 21 2017
%F E.g.f.: 2*(3 -2*x +4*x^2)*exp(2*x) -6*exp(x). - _G. C. Greubel_, Mar 31 2021
%p A036800:= n-> 2^(n+1)*(3-2*n+n^2) -6; seq(A036800(n), n=0..30); # _G. C. Greubel_, Mar 31 2021
%t Table[ -6+2^(n+1)*(3-2*n+n^2),{n,0,5!}] (* _Vladimir Joseph Stephan Orlovsky_, Mar 08 2010 *)
%t LinearRecurrence[{7,-18,20,-8},{0,2,18,90},30] (* _Harvey P. Dale_, Jun 13 2015 *)
%o (Magma) [-6+2^(n+1)*(3-2*n+n^2): n in [0..30]]; // _Vincenzo Librandi_, Oct 04 2011
%o (PARI) a(n)=2^(n+1)*(3 - 2*n + n^2) - 6 \\ _Charles R Greathouse IV_, Jun 11 2015
%o (Sage) [2^(n+1)*(3-2*n+n^2) -6 for n in (0..30)] # _G. C. Greubel_, Mar 31 2021
%Y Cf. A232599, A232600, A232601, A232602.
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_