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”).

Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 2,1.
1

%I #31 Feb 17 2024 10:30:31

%S 2,21,212,2121,21212,212121,2121212,21212121,212121212,2121212121,

%T 21212121212,212121212121,2121212121212,21212121212121,

%U 212121212121212,2121212121212121

%N Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 2,1.

%H Vincenzo Librandi, <a href="/A037495/b037495.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (10,1,-10).

%F G.f.: x*(2+x) / ((x-1)*(10*x-1)*(1+x)). - _R. J. Mathar_, Nov 21 2011

%t Table[-(1/6)-(1/22)*(-1)^n+(7/33)*10^n,{n,1,20}] (* _Vincenzo Librandi_, Nov 23 2011 *)

%t Table[FromDigits[PadRight[{},n,{2,1}]],{n,20}] (* _Harvey P. Dale_, Aug 21 2013 *)

%o (Magma) [-(1/6)-(1/22)*(-1)^n+(7/33)*10^n: n in [1..20]]; // _Vincenzo Librandi_, Nov 23 2011

%K nonn,easy,base

%O 1,1

%A _Clark Kimberling_