login
A037495
Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 2,1.
1
2, 21, 212, 2121, 21212, 212121, 2121212, 21212121, 212121212, 2121212121, 21212121212, 212121212121, 2121212121212, 21212121212121, 212121212121212, 2121212121212121
OFFSET
1,1
FORMULA
G.f.: x*(2+x) / ((x-1)*(10*x-1)*(1+x)). - R. J. Mathar, Nov 21 2011
MATHEMATICA
Table[-(1/6)-(1/22)*(-1)^n+(7/33)*10^n, {n, 1, 20}] (* Vincenzo Librandi, Nov 23 2011 *)
Table[FromDigits[PadRight[{}, n, {2, 1}]], {n, 20}] (* Harvey P. Dale, Aug 21 2013 *)
PROG
(Magma) [-(1/6)-(1/22)*(-1)^n+(7/33)*10^n: n in [1..20]]; // Vincenzo Librandi, Nov 23 2011
CROSSREFS
Sequence in context: A329318 A037559 A042349 * A024763 A304272 A037575
KEYWORD
nonn,easy,base
STATUS
approved