login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A179868 (Number of 1's in binary expansion of n) mod 4. 1
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

Table of n, a(n) for n=0..100.

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

(PARI) a(n)=hammingweight(n)%4 \\ Charles R Greathouse IV, May 09 2016

CROSSREFS

Cf. A010060, A071858.

Sequence in context: A261923 A124736 A144016 * A104232 A072086 A180094

Adjacent sequences:  A179865 A179866 A179867 * A179869 A179870 A179871

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Jan 11 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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 8 09:03 EST 2016. Contains 278906 sequences.