login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A177702 Period 3: repeat [1, 1, 2]. 3
1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Continued fraction expansion of (2+sqrt(10))/3.

Decimal expansion of 112/999.

a(n) = A131534(n+2) = |A132419(n)| = |A132367(n)| = |A131556(n+2)|= |A122876(n)|.

LINKS

Table of n, a(n) for n=0..104.

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

FORMULA

a(n) = a(n-3) for n > 2, with a(0) = 1, a(1) = 1, a(2) = 2.

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

a(n) = 2-((n+1)^2 mod 3). - Paolo P. Lava, Jul 02 2010

a(n) = 4/3 - cos(2*Pi*n/3)/3 - sin(2*Pi*n/3)/sqrt(3). - R. J. Mathar, Oct 08 2011

a(n) = 1 + A022003(n). - Wesley Ivan Hurt, Jul 01 2016

MAPLE

seq(op([1, 1, 2]), n=1..50); # Wesley Ivan Hurt, Jul 01 2016

MATHEMATICA

PadRight[{}, 120, {1, 1, 2}] (* or *) LinearRecurrence[{0, 0, 1}, {1, 1, 2}, 120] (* Harvey P. Dale, Dec 19 2014 *)

PROG

(MAGMA) &cat[ [1, 1, 2]: k in [1..35] ];

(PARI) a(n)=max(n%3, 1) \\ Charles R Greathouse IV, Jul 17 2016

CROSSREFS

Cf. A022003, A131534, A177703.

Sequence in context: A132367 A087204 A101825 * A131534 A061347 A115579

Adjacent sequences:  A177699 A177700 A177701 * A177703 A177704 A177705

KEYWORD

cofr,nonn,easy

AUTHOR

Klaus Brockhaus, May 11 2010

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 October 21 06:39 EDT 2019. Contains 328292 sequences. (Running on oeis4.)