login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037610 Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 1,2,3. 9

%I #51 Dec 14 2023 05:39:19

%S 1,12,123,1231,12312,123123,1231231,12312312,123123123,1231231231,

%T 12312312312,123123123123,1231231231231,12312312312312,

%U 123123123123123,1231231231231231,12312312312312312,123123123123123123,1231231231231231231,12312312312312312312

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

%C Periodic sequences of this type can be easily calculated by a(n) = floor(q*10^n/(10^m-1)), where q is the number representing the periodic digit pattern (=123 for this sequence) and m is the period length. - _Hieronymus Fischer_ Jan 03 2013

%H Hieronymus Fischer, <a href="/A037610/b037610.txt">Table of n, a(n) for n = 1..200</a>

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

%F a(n) = floor((41/333)*10^n). - _Hieronymus Fischer_, Jan 03 2013

%F From _Colin Barker_, Apr 30 2014: (Start)

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

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

%F a(n) = (41*10^n - 27*n - 50 + 90*floor(n/3) - 9*floor((n - 1)/3))/333. - _Bruno Berselli_, Sep 13 2018

%p A037610:=n->floor((41/333)*10^n); seq(A037610(n), n=1..20); # _Wesley Ivan Hurt_, Apr 19 2014

%t a[n_] := Floor[41/333*10^n]; Array[a, 19] (* _Robert G. Wilson v_, Apr 18 2014 *)

%t Table[FromDigits[PadRight[{},n,{1,2,3}]],{n,20}] (* or *) LinearRecurrence[ {10,0,1,-10},{1,12,123,1231},20] (* _Harvey P. Dale_, May 09 2014 *)

%o (PARI) A037610(n)=10^n*41\333 \\ _M. F. Hasler_, Jan 13 2013

%o (PARI) Vec(x*(3*x^2+2*x+1)/((x-1)*(10*x-1)*(x^2+x+1)) + O(x^100)) \\ _Colin Barker_, Apr 30 2014

%o (Magma) [(41*10^n-27*n-50+90*Floor(n/3)-9*Floor((n-1)/3))/333: n in [1..30]]; // _Bruno Berselli_, Sep 13 2018

%K nonn,base,easy

%O 1,2

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)