OFFSET
1,2
COMMENTS
More generally, a(n) = B^K + n; K = floor(log_B a(n-1)) + 1. This sequence has B=10, a(0)=1; A006127 has B=2, a(0)=1; A052944 has B=2, a(0)=2; A104743 has B=3, a(0)=1; A104745 has B=5, a(0)=1. - Ctibor O. Zizka, Mar 22 2008
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..300
Index entries for linear recurrences with constant coefficients, signature (12,-21,10).
FORMULA
a(n) = 10^(n-1) + n-1.
G.f.: x*(1 -x -9*x^2)/((1-10*x)*(1-x)^2). - Vincenzo Librandi, Jun 16 2013
a(n) = 12*a(n-1) -21*a(n-2) +10*a(n-3). - Vincenzo Librandi, Jun 16 2013
E.g.f.: (1/10)*(9 - 10*(1-x)*exp(x) + exp(10*x)). - G. C. Greubel, May 27 2021
MAPLE
seq(10^(n-1) +n-1, n=1..40); # G. C. Greubel, May 27 2021
MATHEMATICA
Table[10^(n-1) +n-1, {n, 30}] (* or *) CoefficientList[Series[(1-x-9x^2)/((1-10x)(1-x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 16 2013 *)
PROG
(Magma) [10^(n-1)+n-1: n in [1..20]]; /* or */ I:=[1, 11, 102]; [n le 3 select I[n] else 12*Self(n-1)-21*Self(n-2)+10*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 16 2013
(Sage) [10^(n-1) +n-1 for n in (1..40)] # G. C. Greubel, May 27 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Apr 01 2003
STATUS
approved