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!)
A130196 Period 3: repeat [1, 2, 2]. 24
1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

From Reinhard Zumkeller, Nov 12 2009: (Start)

Denominator of x(n) = x(n-1) + x(n-2), x(0)=0, x(1)=1/2; numerator = A167808;

a(n) = A131534(n) + A022003(n) = A080425(n) - A131534(n) + 2 = A153727(n)/A131534(n). (End)

Continued fraction expansion of (5+sqrt(85))/10. - Klaus Brockhaus, May 07 2010

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+3) = a(n) with a(0)=1, a(1)=a(2)=2.

a(n) = (1/9)*(8*(n mod 3) + 5*((n+1) mod 3) + 2*((n+2) mod 3)). - Paolo P. Lava, Aug 28 2007

G.f.: (1+2*x+2*x^2)/(1-x)*(x^2+x+1). - R. J. Mathar, Nov 14 2007

a(n) = 5/3 + (2/3)*(-1/2 - (1/2)*i*sqrt(3))^(-2)*(-1/2 - (1/2)*i*sqrt(3))^n + (2/3)*(-1/2 + (1/2)*i*sqrt(3))^(-2)*(-1/2 + (1/2)*i*sqrt(3))^n + (1/3)*(-1/2 - (1/2)*i*sqrt(3))^n + (1/3)*(-1/2 + (1/2)*i*sqrt(3))^n + (2/3)*(-1/2 - (1/2)*i*sqrt(3))^(-1)*(-1/2 - (1/2)*i*sqrt(3))^n + (2/3)*(-1/2 + (1/2)*i*sqrt(3))^(-1)*(-1/2 + (1/2)*i*sqrt(3))^n, with i=sqrt(-1). - Paolo P. Lava, Jul 17 2008

a(n) = (5 - 2*cos(2*Pi*n/3))/3. - Jaume Oliver Lafont, Nov 23 2008

a(n) = 2 - 0^(n mod 3). - Reinhard Zumkeller, Nov 12 2009

a(n) = A011655(n) + 1 = (n^2 mod 3) + 1. - Boris Putievskiy, Feb 03 2013

a(n) = floor((n+1)*5/3) - floor(n*5/3). - Hailey R. Olafson, Jul 23 2014

E.g.f.: (5*exp(x) - 2*exp(-x/2)*cos(sqrt(3)*x/2))/3. - Stefano Spezia, Jun 03 2021

MAPLE

A130196:=n->floor(5*(n+1)/3)-floor(5*n/3): seq(A130196(n), n=0..100); # Wesley Ivan Hurt, Jul 24 2014

MATHEMATICA

Table[Floor[5 (n + 1)/3] - Floor[5 n/3], {n, 0, 100}] (* Wesley Ivan Hurt, Jul 24 2014 *)

Denominator[LinearRecurrence[{1, 1}, {0, 1/2}, 110]] (* or *) PadRight[{}, 110, {1, 2, 2}] (* Harvey P. Dale, Aug 08 2014 *)

LinearRecurrence[{0, 0, 1}, {1, 2, 2}, 105] (* Ray Chandler, Aug 03 2015 *)

PROG

(PARI) a(n)=2-0^(n%3) \\ Charles R Greathouse IV, Jun 01 2011

(Magma) [Floor(5*(n+1)/3)-Floor(5*n/3) : n in [0..100]]; // Wesley Ivan Hurt, Jul 24 2014

CROSSREFS

Cf. A177347 (decimal expansion of (5+sqrt(85))/10).

Cf. A022003, A080425, A131534, A153727, A167808.

Sequence in context: A098398 A306211 A131714 * A230866 A158209 A234538

Adjacent sequences:  A130193 A130194 A130195 * A130197 A130198 A130199

KEYWORD

nonn,easy

AUTHOR

Paul Curtz, Aug 05 2007

EXTENSIONS

More terms from Klaus Brockhaus, May 07 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 3 22:17 EDT 2022. Contains 357237 sequences. (Running on oeis4.)