login
A161560
a(n) = floor(A000069(n)/2-1/2).
1
0, 0, 1, 3, 3, 5, 6, 6, 7, 9, 10, 10, 12, 12, 13, 15, 15, 17, 18, 18, 20, 20, 21, 23, 24, 24, 25, 27, 27, 29, 30, 30, 31, 33, 34, 34, 36, 36, 37, 39, 40, 40, 41, 43, 43, 45, 46, 46, 48, 48, 49, 51, 51, 53, 54, 54, 55, 57, 58, 58, 60, 60, 61, 63, 63, 65, 66, 66, 68, 68, 69, 71, 72
OFFSET
1,4
COMMENTS
Plays the role of an inverse function to A093505.
FORMULA
a(n) = A000069(n) - n.
EXAMPLE
a(5) = 3 because the fifth odious number = 8 and floor(8/2 - 1/2) = 3. Also 8 - 5 = 3.
PROG
(PARI) a(n)=n-1-hammingweight(n-1)%2 \\ Charles R Greathouse IV, Mar 29 2013
CROSSREFS
Cf. A000069.
Sequence in context: A131948 A134636 A088564 * A078796 A201929 A079789
KEYWORD
nonn,easy
AUTHOR
Jaroslav Krizek, Jun 13 2009
STATUS
approved