The parity of a number is the sum of the bits in Binary representation (mod 2). The parities of the first few integers (starting with 0) are 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, ... (Sloane's A010060) summarized in the following table.

Binary | Parity | Binary | Parity | ||

1 | 1 | 1 | 11 | 1011 | 1 |

2 | 10 | 1 | 12 | 1100 | 0 |

3 | 11 | 0 | 13 | 1101 | 1 |

4 | 100 | 1 | 14 | 1110 | 1 |

5 | 101 | 0 | 15 | 1111 | 0 |

6 | 110 | 0 | 16 | 10000 | 1 |

7 | 111 | 1 | 17 | 10001 | 0 |

8 | 1000 | 1 | 18 | 10010 | 0 |

9 | 1001 | 0 | 19 | 10011 | 1 |

10 | 1010 | 0 | 20 | 10100 | 0 |

The constant generated by the sequence of parity digits is called the Thue-Morse Constant.

**References**

Sloane, N. J. A. Sequence A010060 in ``The On-Line Version of the Encyclopedia of Integer Sequences.'' http://www.research.att.com/~njas/sequences/eisonline.html.

© 1996-9

1999-05-26