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!)
A234538 (Number of positive digits of n written in base 3) modulo 3. 1
0, 1, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 0, 0, 2, 0, 0, 1, 2, 2, 2, 0, 0, 2, 0, 0, 1, 2, 2, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 1, 1, 2, 2, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1, 0, 1, 1, 1, 2, 2, 2, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 1, 2, 0, 0, 0, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Since A000120 is the number of positive digits of n written in binary, this sequence is a formal ternary analog of the Thue-Morse sequence A010060. However, one cannot name it a "ternary version of A010060" like the known versions A053838, A071858, A036577-A036586, since it is not "cubefree"; i.e., it contains the same 3 consecutive terms, and there is not a known morphism for which it is a fixed point.
LINKS
FORMULA
A160384(n) == a(n) (mod 3).
MATHEMATICA
a[n_] := Mod[Plus @@ DigitCount[n, 3, {1, 2}], 3]; Array[a, 100, 0] (* Amiram Eldar, Jul 24 2023 *)
PROG
(PARI) a(n)=my(d=digits(n, 3)); sum(i=1, #d, !d[i])%3 \\ Charles R Greathouse IV, Jan 13 2014
CROSSREFS
Sequence in context: A130196 A230866 A158209 * A119646 A024693 A025126
KEYWORD
nonn,base,easy
AUTHOR
Vladimir Shevelev, Jan 13 2014
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 25 11:16 EDT 2024. Contains 371967 sequences. (Running on oeis4.)