login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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