A376616 Binary Niven numbers (A049445) k such that k/wt(k) is also a binary Niven number, where wt(k) = A000120(k) is the binary weight of k.
1, 2, 4, 8, 12, 16, 20, 24, 32, 36, 40, 48, 64, 68, 72, 80, 96, 126, 128, 132, 136, 144, 160, 192, 240, 252, 256, 260, 264, 272, 276, 288, 320, 324, 345, 368, 384, 405, 414, 432, 460, 464, 480, 486, 504, 512, 516, 520, 528, 544, 552, 576, 624, 640, 648, 688, 690
Offset: 1
Examples
12 is a term since 12/wt(12) = 6 is an integer and also 6/wt(6) = 3 is an integer.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
q[k_] := Module[{w = DigitCount[k, 2, 1]}, Divisible[k, w] && Divisible[k/w, DigitCount[k/w, 2, 1]]]; Select[Range[1000], q]
-
PARI
is(k) = {my(w = hammingweight(k)); !(k % w) && !((k/w) % hammingweight(k/w));}
Comments