A128797 (n^2-n)*3^n.
0, 0, 18, 162, 972, 4860, 21870, 91854, 367416, 1417176, 5314410, 19486170, 70150212, 248714388, 870500358, 3013270470, 10331213040, 35126124336, 118550669634, 397493421714, 1324978072380, 4393348345260, 14498049539358
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (9,-27,27).
Programs
-
Magma
[(n^2-n)*3^n: n in [0..25]]; // Vincenzo Librandi, Feb 10 2013
-
Mathematica
CoefficientList[Series[18 x^2/(1 - 3 x)^3, {x, 0, 30}], x] (* Vincenzo Librandi, Feb 10 2013 *) LinearRecurrence[{9,-27,27},{0,0,18},40] (* Harvey P. Dale, Dec 15 2014 *)
Formula
G.f.: 18*x^2/(1-3*x)^3. - Vincenzo Librandi, Feb 10 2013
a(n) = 18*A027472(n+1). - R. J. Mathar, Apr 26 2015