A192937 a(n) = 100*a(n-1) - (n-1) with a(1)=100.
100, 9999, 999898, 99989797, 9998979696, 999897969595, 99989796959494, 9998979695949393, 999897969594939292, 99989796959493929191, 9998979695949392919090, 999897969594939291908989
Offset: 1
Examples
For n=2: a(2)=100*a(1)-(2-1)=100*100-1=10000-1=9999. For n=3: a(3)=100*a(2)-(3-1)=100*9999-2=999900-2=999898.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..300
- Index entries for linear recurrences with constant coefficients, signature (102,-201,100).
Programs
-
GAP
List([1..20], n -> (98*10^(2*n+2) +99*n +1)/9801); # G. C. Greubel, Feb 06 2019
-
Magma
[n lt 2 select 100 else 100*Self(n-1)-n+1: n in [1..14]]; // Bruno Berselli, Aug 02 2011
-
Maple
a[1]:=100; for n from 2 to 12 do a[n]:=100*a[n-1]-(n-1); end do;
-
Mathematica
LinearRecurrence[{102,-201,100}, {100,9999,999898}, 20] (* G. C. Greubel, Feb 06 2019 *) RecurrenceTable[{a[1]==100,a[n]==100a[n-1]-n+1},a,{n,20}] (* Harvey P. Dale, May 17 2019 *)
-
PARI
vector(20, n, (98*10^(2*n+2) +99*n +1)/9801) \\ G. C. Greubel, Feb 06 2019
-
Sage
[(98*10^(2*n+2) +99*n +1)/9801 for n in (1..20)] # G. C. Greubel, Feb 06 2019
Formula
From Bruno Berselli, Aug 02 2011: (Start)
G.f.: x*(100-201*x+100*x^2)/((1-100*x)*(1-x)^2).
a(n) = (9800*100^n+99*n+1)/9801. (End)