%I #18 Sep 08 2022 08:45:29
%S 0,3,36,243,1296,6075,26244,107163,419904,1594323,5904900,21434787,
%T 76527504,269440587,937461924,3228504075,11019960576,37321507107,
%U 125524238436,419576389587,1394713760400,4613015762523,15188432850756
%N a(n) = n^2*3^n.
%H Vincenzo Librandi, <a href="/A127960/b127960.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (9,-27,27).
%F G.f.: 3*x*(1 + 3*x)/(1 - 3*x)^3. - _Vincenzo Librandi_, Feb 07 2013
%F a(n) = 9*a(n-1) - 27*a(n-2) + 27*a(n-3). - _Vincenzo Librandi_, Feb 07 2013
%F a(n) = 3*A069996(n) for n>0. - _Bruno Berselli_, Feb 07 2013
%F E.g.f.: (9*x^2 + 3*x)*exp(3*x). - _G. C. Greubel_, May 04 2018
%t LinearRecurrence[{9,-27,27}, {0,3,36}, 25] (* or *) CoefficientList[ Series[3*x(1 + 3*x)/(1 - 3*x)^3, {x, 0, 30}], x] (* _Vincenzo Librandi_, Feb 07 2013 *)
%o (Magma) [n^2*3^n: n in [0..30]]; // _Vincenzo Librandi_, Feb 07 2013
%o (PARI) for(n=0,30, print1(n^2*3^n, ", ")) \\ _G. C. Greubel_, May 04 2018
%Y Cf. A036289, A007758, A069996.
%K nonn,easy
%O 0,2
%A _Mohammad K. Azarian_, Apr 07 2007