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!)
A037559 Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 2,1,1. 2
2, 21, 211, 2112, 21121, 211211, 2112112, 21121121, 211211211, 2112112112, 21121121121, 211211211211, 2112112112112, 21121121121121, 211211211211211, 2112112112112112 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..16.

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

FORMULA

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

G.f.: x*(2+x+x^2) / ((x-1)*(10*x-1)*(1+x+x^2)). - R. J. Mathar, Nov 21 2011

MATHEMATICA

Table[FromDigits[PadRight[{}, n, {2, 1, 1}]], {n, 20}] (* Harvey P. Dale, Jul 15 2019 *)

PROG

(PARI) Vec(x*(2+x+x^2) / ((x-1)*(10*x-1)*(1+x+x^2)) + O(x^25)) \\ Jinyuan Wang, Apr 14 2020

CROSSREFS

Sequence in context: A037736 A328073 A329318 * A042349 A037495 A024763

Adjacent sequences:  A037556 A037557 A037558 * A037560 A037561 A037562

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 January 23 07:09 EST 2022. Contains 350506 sequences. (Running on oeis4.)