OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (13,-66,162,-189,81).
FORMULA
a(n) = Sum_{k=0..n} 3^k*k^3.
a(n) = Sum_{k=0..n} A062074(k).
G.f.: 3*x*(1 + 12*x + 9*x^2)/((1 - 3*x)^4*(1 - x)). - Stefano Spezia, May 01 2021
a(n) = ((4*n^3-6*n^2+12*n-11)*3^(n+1) + 33) / 8. - Kevin Ryde, May 01 2021
E.g.f.: (3/8)*(11*exp(x) + (-11 + 30*x + 54*x^2 + 108*x^3)*exp(3*x)). - G. C. Greubel, May 18 2022
a(n) = 13*a(n-1) - 66*a(n-2) + 162*a(n-3) - 189*a(n-4) + 81*a(n-5). - Wesley Ivan Hurt, Apr 16 2023
EXAMPLE
a(3) = 1^3*3^1+2^3*3^2+3^3*3^3 = 3+8*9+27*27 = 804.
MATHEMATICA
CoefficientList[Series[3x(1 +12x +9x^2)/((1-3x)^4*(1-x)), {x, 0, 23}], x] (* Michael De Vlieger, May 01 2021 *)
PROG
(PARI) a(n) = sum(k=0, n, 3^k*k^3); \\ Michel Marcus, Apr 30 2021
(PARI) a(n) = ((((n<<2 - 6)*n + 12)*n - 11)*3^(n+1) + 33) >> 3; \\ Kevin Ryde, May 01 2021
(SageMath) [((4*n^3-6*n^2+12*n-11)*3^(n+1) +33)/8 for n in (0..30)] # G. C. Greubel, May 18 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sebastian Krüger, Apr 30 2021
STATUS
approved