OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2, -1, 2, -1, 2, -1).
FORMULA
G.f.: (t^6 + t^5 + t^4 + t^3 + t^2 + t + 1)/(t^6 - 2*t^5 + t^4 - 2*t^3 + t^2 - 2*t + 1).
a(n) = 2*a(n-1)-a(n-2)+2*a(n-3)-a(n-4)+2*a(n-5)-a(n-6). - Wesley Ivan Hurt, May 11 2021
MAPLE
seq(coeff(series((1-t^7)/((1-t)*(1-2*t+t^2-2*t^3+t^4-2*t^5+t^6)), t, n+1), t, n), n = 0 .. 35); # G. C. Greubel, Aug 24 2019
MATHEMATICA
CoefficientList[Series[(1-t^7)/((1-t)*(1-2*t+t^2-2*t^3+t^4-2*t^5+t^6)), {t, 0, 35}], t] (* G. C. Greubel, Sep 15 2017 *)
LinearRecurrence[{2, -1, 2, -1, 2, -1}, {1, 3, 6, 12, 24, 48, 96}, 40] (* Harvey P. Dale, May 21 2021 *)
PROG
(PARI) (t='t+O('t^35)); Vec((1-t^7)/((1-t)*(1-2*t+t^2-2*t^3+t^4-2*t^5 +t^6))) \\ G. C. Greubel, Sep 15 2017
(Magma) R<t>:=PowerSeriesRing(Integers(), 35); Coefficients(R!( (1-t^7)/( (1-t)*(1-2*t+t^2-2*t^3+t^4-2*t^5+t^6)) )); // G. C. Greubel, Aug 24 2019
(Sage)
def A164352_list(prec):
P.<t> = PowerSeriesRing(ZZ, prec)
return P((1-t^7)/((1-t)*(1-2*t+t^2-2*t^3+t^4-2*t^5+t^6))).list()
A164352_list(35) # G. C. Greubel, Aug 24 2019
(GAP) a:=[3, 6, 12, 24, 48, 96];; for n in [7..35] do a[n]:=2*a[n-1] -a[n-2]+2*a[n-3]-a[n-4]+2*a[n-5]-a[n-6]; od; Concatenation([1], a); # G. C. Greubel, Aug 24 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
John Cannon and N. J. A. Sloane, Dec 03 2009
STATUS
approved