OFFSET
0,3
COMMENTS
The factor 2^n (i.e., |1/q|^n) is present to make the values integers.
See also A232600 and references therein for integer values of q.
The same values with different signs are produced by a(n) = n^3 - 2*a(n). The signs are all positive until n = 15, with negative signs on values for all subsequent odd indices. - Richard R. Forberg, Feb 17 2014.
LINKS
Stanislav Sykora, Table of n, a(n) for n = 0..1000
S. Sykora, Finite and Infinite Sums of the Power Series (k^p)(x^k), DOI 10.3247/SL1Math06.002, Section V.
Index entries for linear recurrences with constant coefficients, signature (-2,2,8,7,2).
FORMULA
a(n) = (2^(n+1) + (-1)^n*(9*n^3+18*n^2+6*n-2))/27.
G.f.: x*(1-4*x+x^2) / ( (2*x-1)*(1+x)^4 ). - R. J. Mathar, Nov 23 2014
E.g.f.: (1/27)*(2*exp(2*x) - (2 +33*x -45*x^2 +9*x^3)*exp(-x)). - G. C. Greubel, Mar 31 2021
a(n) = - 2*a(n-1) + 2*a(n-2) + 8*a(n-3) + 7*a(n-4) + 2*a(n-5). - Wesley Ivan Hurt, Mar 31 2021
EXAMPLE
a(3) = 2^3 * (0^3/2^0 - 1^3/2^1 + 2^3/2^2 - 3^3/2^3) = 0-4+16-27 = -15.
MAPLE
A232604:= n-> (2^(n+1) +(-1)^n*(9*n^3 +18*n^2 +6*n -2))/27; seq(A232604(n), n=0..30); # G. C. Greubel, Mar 31 2021
MATHEMATICA
LinearRecurrence[{-2, 2, 8, 7, 2}, {0, -1, 6, -15, 34}, 35] (* G. C. Greubel, Mar 31 2021 *)
PROG
(PARI) a(n)=(2^(n+1)+(-1)^n*(9*n^3+18*n^2+6*n-2))/27;
(Magma) [(2^(n+1) + (-1)^n*(9*n^3 +18*n^2 +6*n -2))/27: n in [0..35]]; // G. C. Greubel, Mar 31 2021
(Sage) [(2^(n+1) + (-1)^n*(9*n^3 +18*n^2 +6*n -2))/27 for n in (0..35)] # G. C. Greubel, Mar 31 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Stanislav Sykora, Nov 27 2013
STATUS
approved