

A096271


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


3



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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


LINKS

Antti Karttunen, Table of n, a(n) for n = 0..65537
Index entries for sequences that are fixed points of mappings


FORMULA

Recurrence: a(2n) = 0, a(2n+1) = (a(n)+1) mod 3.  Ralf Stephan, Dec 11 2004
a(n) = A007814(n+1) mod 3.  Gabriele Fici, Mar 28 2019


MATHEMATICA

Nest[ Function[ l, {Flatten[(l /. {0 > {0, 1}, 1 > {0, 2}, 2 > {0, 0}})]}], {0}, 7] (* Robert G. Wilson v, Feb 26 2005 *)


PROG

(PARI) map(d)=if(d==2, [0, 0], if(d==1, [0, 2], [0, 1]))
{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
(PARI) A096271(n) = if(!(n%2), 0, (1+A096271((n1)/2))%3); \\ Antti Karttunen, Nov 01 2018


CROSSREFS

Cf. A071858.
Sequence in context: A202523 A215935 A270573 * A285640 A231189 A219558
Adjacent sequences: A096268 A096269 A096270 * A096272 A096273 A096274


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane, Jun 23 2004


EXTENSIONS

More terms from Klaus Brockhaus, Jun 23 2004


STATUS

approved



