login
This site is supported by donations 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
1, 12, 123, 1231, 12312, 123123, 1231231, 12312312, 123123123, 1231231231, 12312312312, 123123123123, 1231231231231, 12312312312312, 123123123123123, 1231231231231231, 12312312312312312, 123123123123123123, 1231231231231231231, 12312312312312312312 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

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

LINKS

Hieronymus Fischer, Table of n, a(n) for n = 1..200

Index entries for linear recurrences with constant coefficients, signature (10,0,1,-10).

FORMULA

a(n) = 10*a(n-1) + ((n+2) mod 3) + 1, with a(0)=0. - Paolo P. Lava, Jul 30 2009

a(n) = floor((41/333)*10^n). - Hieronymus Fischer, Jan 03 2013

From Colin Barker, Apr 30 2014: (Start)

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

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

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

MAPLE

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

MATHEMATICA

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

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 *)

PROG

(PARI) A037610(n)=10^n*41\333  \\ M. F. Hasler, Jan 13 2013

(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

(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

CROSSREFS

Sequence in context: A144165 A113572 A037701 * A035239 A057137 A252043

Adjacent sequences:  A037607 A037608 A037609 * A037611 A037612 A037613

KEYWORD

nonn,base,easy

AUTHOR

Clark Kimberling

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 25 22:28 EDT 2019. Contains 321477 sequences. (Running on oeis4.)