|
|
A179868
|
|
(Number of 1's in the binary expansion of n) mod 4.
|
|
2
|
|
|
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 0, 1, 2, 2, 3, 2, 3, 3, 0, 2, 3, 3, 0, 3, 0, 0, 1, 1, 2, 2, 3, 2, 3, 3, 0, 2, 3, 3, 0, 3, 0, 0, 1, 2, 3, 3, 0, 3, 0, 0, 1, 3, 0, 0, 1, 0, 1, 1, 2, 1, 2, 2, 3, 2, 3, 3, 0, 2, 3, 3, 0, 3, 0, 0, 1, 2, 3, 3, 0, 3, 0, 0, 1, 3, 0, 0, 1, 0, 1, 1, 2, 2, 3, 3, 0, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
This is the generalized Thue-Morse sequence t_4 (Allouche and Shallit, p. 335).
|
|
REFERENCES
|
J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
Nest[ Flatten[ # /. {0 -> {0, 1}, 1 -> {1, 2}, 2 -> {2, 3}, 3 -> {3, 0}}] &, {0}, 7] (* Robert G. Wilson v, May 17 2014 *)
Table[Mod[DigitCount[n, 2, 1], 4], {n, 0, 110}] (* Harvey P. Dale, Jul 24 2016 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|