login
A037609
Base 9 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,3.
0
1, 11, 102, 919, 8273, 74460, 670141, 6031271, 54281442, 488532979, 4396796813, 39571171320, 356140541881, 3205264876931, 28847383892382, 259626455031439, 2336638095282953
OFFSET
1,2
FORMULA
G.f.: x*(1+2*x+3*x^2) / ( (x-1)*(9*x-1)*(1+x+x^2) ). - R. J. Mathar, Apr 27 2015
A007095(a(n)) = A037610(n). - R. J. Mathar, Apr 27 2015
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {1, 2, 3}], 9], {n, 20}] (* or *) LinearRecurrence[{9, 0, 1, -9}, {1, 11, 102, 919}, 20] (* Harvey P. Dale, Nov 16 2024 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -9, 1, 0, 9]^(n-1)*[1; 11; 102; 919])[1, 1] \\ Charles R Greathouse IV, Feb 13 2017
CROSSREFS
Sequence in context: A087744 A054421 A037700 * A055150 A014832 A048441
KEYWORD
nonn,base,easy,changed
STATUS
approved