login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096271 Ternary sequence that is a fixed point of the morphism 0 -> 01, 1 -> 02, 2 -> 00. 3

%I

%S 0,1,0,2,0,1,0,0,0,1,0,2,0,1,0,1,0,1,0,2,0,1,0,0,0,1,0,2,0,1,0,2,0,1,

%T 0,2,0,1,0,0,0,1,0,2,0,1,0,1,0,1,0,2,0,1,0,0,0,1,0,2,0,1,0,0,0,1,0,2,

%U 0,1,0,0,0,1,0,2,0,1,0,1,0,1,0,2,0,1,0,0,0,1,0,2,0,1,0,2,0,1,0,2,0,1,0,0,0

%N Ternary sequence that is a fixed point of the morphism 0 -> 01, 1 -> 02, 2 -> 00.

%H Antti Karttunen, <a href="/A096271/b096271.txt">Table of n, a(n) for n = 0..65537</a>

%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>

%F Recurrence: a(2n) = 0, a(2n+1) = (a(n)+1) mod 3. - _Ralf Stephan_, Dec 11 2004

%F a(n) = A007814(n+1) mod 3. - _Gabriele Fici_, Mar 28 2019

%t Nest[ Function[ l, {Flatten[(l /. {0 -> {0, 1}, 1 -> {0, 2}, 2 -> {0, 0}})]}], {0}, 7] (* _Robert G. Wilson v_, Feb 26 2005 *)

%o (PARI) map(d)=if(d==2,[0,0],if(d==1,[0,2],[0,1]))

%o {m=53;v=[];w=[0];while(v!=w,v=w;w=[];for(n=1,min(m,length(v)),w=concat(w,map(v[n]))));for(n=1,2*m,print1(v[n],","))} \\ _Klaus Brockhaus_, Jun 23 2004

%o (PARI) A096271(n) = if(!(n%2),0,(1+A096271((n-1)/2))%3); \\ _Antti Karttunen_, Nov 01 2018

%Y Cf. A071858.

%K nonn,easy

%O 0,4

%A _N. J. A. Sloane_, Jun 23 2004

%E More terms from _Klaus Brockhaus_, Jun 23 2004

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 17 18:08 EST 2020. Contains 330987 sequences. (Running on oeis4.)