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!)
A037495 Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 2,1. 1
2, 21, 212, 2121, 21212, 212121, 2121212, 21212121, 212121212, 2121212121, 21212121212, 212121212121, 2121212121212, 21212121212121, 212121212121212, 2121212121212121 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

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

FORMULA

From Paolo P. Lava, Jul 30 2009: (Start)

a(n) = 10*a(n-1) + (1/2)*(3-(-1)^n), with a(0)=0.

Closed form: a(n) = -1/6 - (1/22)*(-1)^n + (7/33)*10^n, with n > 0. (End)

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

MATHEMATICA

Table[-(1/6)-(1/22)*(-1)^n+(7/33)*10^n, {n, 1, 20}] (* Vincenzo Librandi, Nov 23 2011 *)

Table[FromDigits[PadRight[{}, n, {2, 1}]], {n, 20}] (* Harvey P. Dale, Aug 21 2013 *)

PROG

(MAGMA) [-(1/6)-(1/22)*(-1)^n+(7/33)*10^n: n in [1..20]]; // Vincenzo Librandi, Nov 23 2011

CROSSREFS

Sequence in context: A329318 A037559 A042349 * A024763 A304272 A037575

Adjacent sequences:  A037492 A037493 A037494 * A037496 A037497 A037498

KEYWORD

nonn,easy,base

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 24 22:45 EST 2022. Contains 350565 sequences. (Running on oeis4.)