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 1,0,0.
1

%I #39 Dec 14 2023 05:38:01

%S 1,10,100,1001,10010,100100,1001001,10010010,100100100,1001001001,

%T 10010010010,100100100100,1001001001001,10010010010010,

%U 100100100100100,1001001001001001,10010010010010010,100100100100100100,1001001001001001001,10010010010010010010

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

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

%F From _Paul Barry_, Apr 16 2005: (Start)

%F G.f.: 1/((1-x^3)*(1-10*x)).

%F a(n) = 10*a(n-1) + a(n-3) - 10*a(n-4).

%F a(n) = Sum_{k=0..floor(n/3)} 10^(n-3k), with offset 0.

%F a(n) = Sum_{k=0..n} 10^k*(cos(2*Pi*(n-k)/3 + Pi/3)/3 + sqrt(3)*sin(2*Pi*(n-k)/3 + Pi/3)/3 + 1/3)), with offset 0. (End)

%F a(n) = round( (100/999)*10^n ). - _Tani Akinari_, Jul 15 2014

%t With[{c = PadLeft[{}, 21, {1, 0, 0}]}, Table[FromDigits[Take[c, n]], {n, 20}]] (* _Harvey P. Dale_, Oct 03 2011 *)

%o (Python) print([100*10**n//999 for n in range(1,50)]) # _Karl V. Keller, Jr._, Oct 05 2021

%K nonn,base,easy

%O 1,2

%A _Clark Kimberling_