OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,2,2,2,2,2,2,-3).
FORMULA
G.f.: (x^8 + 2*x^7 + 2*x^6 + 2*x^5 + 2*x^4 + 2*x^3 + 2*x^2 + 2*x + 1)/( 3*x^8 - 2*x^7 - 2*x^6 - 2*x^5 - 2*x^4 - 2*x^3 - 2*x^2 - 2*x + 1).
a(n) = -3*a(n-8) + 2*Sum_{k=1..7} a(n-k). - Wesley Ivan Hurt, May 11 2021
MAPLE
seq(coeff(series((1+t)*(1-t^8)/(1-3*t+5*t^8-3*t^9), t, n+1), t, n), n = 0..30); # G. C. Greubel, Sep 16 2019
MATHEMATICA
CoefficientList[Series[(x^8 +2x^7 +2x^6 +2x^5 +2x^4 +2x^3 +2x^2 +2x +1)/( 3x^8 -2x^7 -2x^6 -2x^5 -2x^4 -2x^3 -2x^2 -2x +1), {x, 0, 40}], x ] (* Vincenzo Librandi, Apr 29 2014 *)
coxG[{8, 3, -2, 30}] (* The coxG program is at A169452 *) (* Harvey P. Dale, Jan 03 2019 *)
PROG
(PARI) my(t='t+O('t^30)); Vec((1+t)*(1-t^8)/(1-3*t+5*t^8-3*t^9)) \\ G. C. Greubel, Sep 16 2019
(Magma) R<t>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1+t)*(1-t^8)/(1-3*t+5*t^8-3*t^9) )); // G. C. Greubel, Sep 16 2019
(SageMath)
def A164697_list(prec):
P.<t> = PowerSeriesRing(ZZ, prec)
return P((1+t)*(1-t^8)/(1-3*t+5*t^8-3*t^9)).list()
A164697_list(30) # G. C. Greubel, Sep 16 2019
(GAP) a:=[4, 12, 36, 108, 324, 972, 2916, 8742];; for n in [9..30] do a[n]:=2*Sum([1..7], j-> a[n-j]) -3*a[n-8]; od; Concatenation([1], a); # G. C. Greubel, Sep 16 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Cannon and N. J. A. Sloane, Dec 03 2009
STATUS
approved
