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

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082389 a(n) = floor((n+2)*phi) - floor((n+1)*phi) where phi=(1+sqrt(5))/2. 6
1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Alternative descriptions (1): unique positive integer sequence taking values in {1,2} satisfying a(1)=1, a(2)=2 and a(a(1)+...+a(n))=a(n) for n >= 3.

(2) Start with 1,2; then for any k>=1, a(a(1)+...+a(k))=a(k), fill in any undefined terms by the rule that a(t) = 1 if a(t-1) = 2 and a(t) = 2 if a(t-1) = 1.

(3) a(1)= 1, a(2)=2, a(a(1)+a(2)+...+a(n))=a(n); a(a(1)+a(2)+...+a(n)+1)=3-a(n).

More generally, the sequence a(n)=floor(r*(n+2))-floor(r*(n+1)), r= (1/2) *(z+sqrt(z^2+4)), z integer >=1, is defined by a(1), a(2) and a(a(1)+a(2)+...+a(n)+f(z))=a(n); a(a(1)+a(2)+...+a(n)+f(z)+1)=(2z+1)-a(n) where f(1)=0, f(z)=z-2 for z>=2.

LINKS

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

FORMULA

a(n) = A014675(n+1); sum(k = 1, n, a(k)) = A058065(n)

Apparently a(n) = A059426(n).

EXAMPLE

a(1)+a(2)=3 and a(a(1)+a(2)) must be a(2) so a(3)=2. Therefore a(a(1)+a(2)+a(3))=a(5)=2 and from the rule the "hole" a(4) is 1. Hence sequence begins 1,2,2,1,2,...

MAPLE

A082389:=n->floor((n+2)*(1+sqrt(5))/2) - floor((n+1)*(1+sqrt(5))/2): seq(A082389(n), n=1..300); # Wesley Ivan Hurt, Jan 16 2017

MATHEMATICA

Rest@Nest[ Flatten[ # /. {1 -> 2, 2 -> {2, 1}}] &, {1}, 11] (* Robert G. Wilson v, Jan 26 2006 *)

CROSSREFS

Same as A014675 without the first term.

Sequence in context: A112104 A059426 A245977 * A246127 A119469 A127439

Adjacent sequences:  A082386 A082387 A082388 * A082390 A082391 A082392

KEYWORD

nonn,nice,easy

AUTHOR

Benoit Cloitre, Apr 14 2003

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified August 17 17:32 EDT 2017. Contains 290651 sequences.