In computer science, an odious number is said to have odd parity.
The first odious numbers are:
If
a(n)
n
a(0)=1
n
a(a(n))=2a(n)
Every positive integer
n
n(n+4)
n=22r-1
n(n+4)=24r+22r+1-3
The odious numbers give the positions of the nonzero values in the Thue–Morse sequence. Every power of two is odious, because its binary expansion has only one nonzero bit. Except for 3, every Mersenne prime is odious, because its binary expansion consists of an odd prime number of consecutive nonzero bits.
Non-negative integers that are not odious are called evil numbers. The partition of the non-negative integers into the odious and evil numbers is the unique partition of these numbers into two sets that have equal multisets of pairwise sums.