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!)
A189664 Fixed point of the morphism 0->010, 1->001. 8
0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
COMMENTS
a(n) is the parity of the number of ternary 1-digits below the lowest 0-digit in the ternary expansion of n-1. All fixed-width morphisms have a similar digital interpretation. - Kevin Ryde, Apr 26 2017
LINKS
FORMULA
a(3k-2)=0, a(3k-1)=1-a(k), a(3k)=a(k) for k>=1, a(0)=0.
2*a(n) = A284794(n) for n >= 1. - Clark Kimberling, Apr 14 2017
This formula cannot be correct, it belongs to A189665. - Michel Dekking, Oct 15 2019
a(n) = A284777(n) - 2n. - Clark Kimberling, Apr 15 2017
EXAMPLE
Iterating the morphism starting with 0:
0: (#=1)
0
1: (#=3)
010
2: (#=9)
010001010
3: (#=27)
010001010010010001010001010
4: (#=81)
010001010010010001010001010010001010010001010010010001010001010010010001010001010
etc.
MATHEMATICA
t = Nest[Flatten[# /. {0->{0, 1, 0}, 1->{0, 0, 1}}] &, {0}, 5] (* A189664 *)
f[n_] := t[[n]]
Flatten[Position[t, 0]] (* A189665 *)
Flatten[Position[t, 1]] (* A189666 *)
s[n_] := Sum[f[i], {i, 1, n}]; s[0] = 0;
Table[s[n], {n, 1, 120}] (* A189667 *)
Nest[Flatten[# /. a_Integer -> {0, Abs[a - 1], a}] &, {0}, 5] (* Robert G. Wilson v, Jul 16 2012 *)
PROG
(PARI) a(n) = n--; my(ret=0); while(n%3, if(n%3==1, ret=!ret); n\=3); ret; /* Kevin Ryde, Jul 23 2019 */
CROSSREFS
Sequence in context: A354354 A117943 A285969 * A260446 A096268 A219097
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 25 2011
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 April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)