login
A143903
A positive integer k is included if |(number of 0's in binary k) - (number of 1's in binary k)| divides k.
1
1, 4, 5, 6, 8, 14, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 34, 36, 40, 46, 48, 54, 58, 60, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 95, 96, 97, 98, 99, 100, 101, 102, 104, 105, 106, 108, 112, 113, 114, 116
OFFSET
1,2
LINKS
EXAMPLE
27 in binary is 11011. The number of 0's is 1. The number of 1's is 4. Since |1-4|=3 divides 27, 27 is a term of the sequence.
MATHEMATICA
Select[Range[100], Abs[DigitCount[ #, 2, 1] - DigitCount[ #, 2, 0]] > 0 && Mod[ #, Abs[DigitCount[ #, 2, 1] - DigitCount[ #, 2, 0]]] == 0 &] (* Stefan Steinerberger, Sep 05 2008 *)
CROSSREFS
Cf. A037861.
Sequence in context: A158650 A256375 A105829 * A006756 A067652 A080805
KEYWORD
nonn
AUTHOR
Leroy Quet, Sep 04 2008
EXTENSIONS
More terms from Stefan Steinerberger, Sep 05 2008
STATUS
approved