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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A053838 a(n) = (sum of digits of n written in base 3) modulo 3. 17
 0, 1, 2, 1, 2, 0, 2, 0, 1, 1, 2, 0, 2, 0, 1, 0, 1, 2, 2, 0, 1, 0, 1, 2, 1, 2, 0, 1, 2, 0, 2, 0, 1, 0, 1, 2, 2, 0, 1, 0, 1, 2, 1, 2, 0, 0, 1, 2, 1, 2, 0, 2, 0, 1, 2, 0, 1, 0, 1, 2, 1, 2, 0, 0, 1, 2, 1, 2, 0, 2, 0, 1, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 2, 0, 1, 0, 1, 2, 1, 2, 0, 0, 1, 2, 1, 2, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Start with 0, repeatedly apply the morphism 0->012, 1->120, 2->201. This is a ternary version of the Thue-Morse sequence A010060. See Brlek (1989). - N. J. A. Sloane, Jul 10 2012 Equals A004128 mod 3. [Gary W. Adamson, Aug 24 2008] A090193 is generated by the same mapping starting with 1. A090239 is generated by the same mapping starting with 2. - Andrey Zabolotskiy, May 04 2016. LINKS Vincenzo Librandi, Table of n, a(n) for n = 0..2000 S. Brlek, Enumeration of factors in the Thue-Morse word, Discrete Applied Math. 24 (1989), 83-96. Arthur Dolgopolov, Equitable Sequencing and Allocation Under Uncertainty, Preprint, 2016. Glen Joyce C. Dulatre, Jamilah V. Alarcon, Vhenedict M. Florida, Daisy Ann A. Disu, On Fractal Sequences, DMMMSU-CAS Science Monitor (2016-2017) Vol. 15 No. 2, 109-113. Michael Gilleland, Some Self-Similar Integer Sequences Michel Rigo, Relations on words, arXiv preprint arXiv:1602.03364 [cs.FL], 2016. See Example 17. Robert Walker, Self Similar Sloth Canon Number Sequences FORMULA a(n) = A010872(A053735(n)) =(n+a(floor[n/3])) mod 3. So one can construct sequence by starting with 0 and mapping 0->012, 1->120 and 2->201 (e.g. 0, 012, 012120201, 012120201120201012201012120, ...) and looking at n-th digit of a term with sufficient digits. MAPLE A053838 := proc(n)     add(d, d=convert(n, base, 3)) ;     modp(%, 3) ; end proc: seq(A053838(n), n=0..100) ; # R. J. Mathar, Nov 04 2017 MATHEMATICA Nest[ Flatten[ # /. {0 -> {0, 1, 2}, 1 -> {1, 2, 0}, 2 -> {2, 0, 1}}] &, {0}, 7] (* Robert G. Wilson v, Mar 08 2005 *) PROG (PARI) a(n) = vecsum(digits(n, 3)) % 3; \\ Michel Marcus, May 04 2016 CROSSREFS Cf. A004128, A010060, A053837, A053839-A053844. Equals A026600(n+1) - 1. Sequence in context: A258196 A159955 A327306 * A342651 A275768 A117167 Adjacent sequences:  A053835 A053836 A053837 * A053839 A053840 A053841 KEYWORD base,nonn AUTHOR Henry Bottomley, Mar 28 2000 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 12 22:36 EDT 2021. Contains 342933 sequences. (Running on oeis4.)