OFFSET
1,2
MATHEMATICA
bw[n_]:=Module[{w=DigitCount[n, 2, 1]}, If[Divisible[n, w], n/w, n]]; Array[ bw, 90] (* Harvey P. Dale, Nov 06 2016 *)
PROG
(PARI) a(n) = my(s=hammingweight(n)); if (n % s, n, n/s); \\ Michel Marcus, Jul 15 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jan 18 2014
STATUS
approved