OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
24 is a term since 24/wt(24) = 12 is an integer, 12/wt(12) = 6 is an integer, and 6/wt(6) = 3 is an integer.
MATHEMATICA
q[k_] := Module[{w = DigitCount[k, 2, 1], w2, m, n}, IntegerQ[m = k/w] && Divisible[m, w2 = DigitCount[m, 2, 1]] && Divisible[n = m/w2, DigitCount[n, 2, 1]]]; Select[Range[2000], q]
PROG
(PARI) s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w))); }
is(k) = {my(sk = s(k)); sk == 0 || sk >= 4; }
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Amiram Eldar, Sep 30 2024
STATUS
approved