%I #26 Sep 08 2022 08:44:32
%S 1,6,45,270,1377,6318,26973,109350,426465,1614006,5963949,21611934,
%T 77058945,271034910,942244893,3242852982,11063007297,37450647270,
%U 125911658925,420738651054,1398200544801,4623476115726
%N a(n) = (n^2 + 1)*3^n.
%D A. M. Gleason et al., The William Lowell Putnam Mathematical Competition: Problems and Solutions 1938-1964, Math. Assoc. America, 1980, p. 115.
%H Vincenzo Librandi, <a href="/A003486/b003486.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.: (1 - 3*x + 18*x^2)/(1-3*x)^3. - _Colin Barker_, Jan 12 2012
%t CoefficientList[Series[(1-3*x+18*x^2)/(1-3*x)^3,{x,0,30}],x] (* _Vincenzo Librandi_, Apr 16 2012 *)
%o (Magma)[(n^2+1)*3^n: n in [0..25]]; // _Vincenzo Librandi_, Apr 16 2012
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_