OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
FORMULA
a(n) = (6*n^2 -54*n +452 + 8*(-1)^n*cos(n*Pi/3) + 8*cos(2*n*Pi/3))/36 for n>9. - G. C. Greubel, Aug 09 2019
MAPLE
seq(coeff(series((1+x^15)/((1-x)*(1-x^2)*(1-x^3)), x, n+1), x, n), n = 1 .. 60); # G. C. Greubel, Aug 09 2019
MATHEMATICA
CoefficientList[Series[(1+x^15)/(1-x)/(1-x^2)/(1-x^3), {x, 0, 60}], x] (* Harvey P. Dale, Dec 28 2013 *)
Join[{1, 1, 2, 3, 4, 5, 7, 8, 10, 12}, Table[(6*n^2 -54*n +452 + 8*(-1)^n*Cos[n*Pi/3] + 8*Cos[2*n*Pi/3])/36, {n, 10, 60}]] (* G. C. Greubel, Aug 09 2019 *)
PROG
(PARI) my(x='x+O('x^60)); Vec((1+x^15)/((1-x)*(1-x^2)*(1-x^3))) \\ G. C. Greubel, Aug 09 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1+x^15)/((1-x)*(1-x^2)*(1-x^3)) )); // G. C. Greubel, Aug 09 2019
(Sage)
def A008758_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1+x^15)/((1-x)*(1-x^2)*(1-x^3)) ).list()
A008758_list(60) # G. C. Greubel, Aug 09 2019
(GAP) a:=[14, 16, 19, 21, 24];; for n in [6..30] do a[n]:=2*a[n-1]-a[n-2] +a[n-3]-2*a[n-4]+a[n-5]; od; Concatenation([1, 1, 2, 3, 4, 5, 7, 8, 10, 12], a); # G. C. Greubel, Aug 09 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved