A180963 Numbers divisible by 3 with an odd number of 1s in their base 2 representation.
21, 42, 69, 81, 84, 87, 93, 117, 138, 162, 168, 171, 174, 186, 213, 234, 261, 273, 276, 279, 285, 309, 321, 324, 327, 333, 336, 339, 342, 345, 348, 351, 357, 369, 372, 375, 381, 405, 426, 453, 465, 468, 471, 477, 501, 522, 546, 552, 555, 558, 570, 597, 618
Offset: 1
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[3 * Range[210], OddQ[DigitCount[#, 2, 1]] &] (* Amiram Eldar, Aug 06 2023 *)
-
PARI
isok(n) = (hammingweight(n) % 2) && (n % 3 == 0) \\ Michel Marcus, Jul 16 2013
Formula
a(n) = 3*A036556(n). - Amiram Eldar, Aug 06 2023
Comments