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!)
A037551 Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 1,2,2. 0
1, 12, 122, 1221, 12212, 122122, 1221221, 12212212, 122122122, 1221221221, 12212212212, 122122122122, 1221221221221, 12212212212212, 122122122122122, 1221221221221221 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
G.f.: x*(1+2*x+2*x^2) / ( (x-1)*(10*x-1)*(1+x+x^2) ). - R. J. Mathar, Aug 12 2013
a(1)=1, a(2)=12, a(3)=122, a(4)=1221, a(n) = 10*a(n-1) + a(n-3) - 10*a(n-4). - Harvey P. Dale, Jan 20 2015
MATHEMATICA
With[{nn=20}, Table[FromDigits[PadRight[{}, n, {1, 2, 2}]], {n, nn}]] (* or *) LinearRecurrence[{10, 0, 1, -10}, {1, 12, 122, 1221}, 20] (* Harvey P. Dale, Jan 20 2015 *)
PROG
(PARI) Vec(x*(1+2*x+2*x^2)/((x-1)*(10*x-1)*(1+x+x^2)) + O(x^25)) \\ Jinyuan Wang, Apr 14 2020
CROSSREFS
Sequence in context: A231869 A038490 A329360 * A134584 A090843 A132927
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)