OFFSET
0,2
COMMENTS
a(n) = (11/10)*{1, 101, 101, 10201, 10201, 1030301, ...} - 100*{0, 1, 0, 100, 0, 10000, ...} - (1/10)*{1, 1, 1, 1, 1, 1, ...}.
Partial sums of A097178.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..980
Index entries for linear recurrences with constant coefficients, signature (1,201,-201,-10100,10100)
FORMULA
G.f.: (1+10*x-101*x^2-900*x^3)/((1-x)*(1-100*x^2)*(1-101*x^2)).
a(n) = (11/20)*( (1-sqrt(101))*(-sqrt(101))^n + (1+sqrt(101))*(sqrt(101))^n ) - 5*(10^n - (-10)^n) - 1/10.
a(n) = a(n-1) + 201*a(n-2) - 201*a(n-3) - 10100*a(n-4) + 10100*a(n-5).
MAPLE
seq(coeff(series((1+10*x-101*x^2-900*x^3)/((1-x)*(1-100*x^2)*(1-101*x^2)), x, n+1), x, n), n = 0 ..20); # G. C. Greubel, Sep 17 2019
MATHEMATICA
Accumulate[LinearRecurrence[{0, 201, 0, -10100}, {1, 10, 100, 1110}, 20]] (* or *) LinearRecurrence[{1, 201, -201, -10100, 10100}, {1, 11, 111, 1221, 11221}, 20] (* Harvey P. Dale, Dec 08 2018 *)
PROG
(PARI) my(x='x+O('x^20)); Vec((1+10*x-101*x^2-900*x^3)/((1-x)*(1-100*x^2)*(1-101*x^2))) \\ G. C. Greubel, Sep 17 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 20); Coefficients(R!( (1+10*x-101*x^2-900*x^3)/((1-x)*(1-100*x^2)*(1-101*x^2)) )); // G. C. Greubel, Sep 17 2019
(Sage)
def A097177_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1+10*x-101*x^2-900*x^3)/((1-x)*(1-100*x^2)*(1-101*x^2))).list()
A097177_list(20) # G. C. Greubel, Sep 17 2019
(GAP) a:=[1, 11, 111, 1221, 11221];; for n in [6..20] do a[n]:=a[n-1] + 201*a[n-2] - 201*a[n-3] - 10100*a[n-4] + 10100*a[n-5]; od; a; # G. C. Greubel, Sep 17 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 30 2004
STATUS
approved