OFFSET
1,2
COMMENTS
Is a(n) > 0 for every n > 0?
EXAMPLE
For n = 7:
- the divisors of 7 are: 1, 7,
- the corresponding Hamming weights are: 1, 3,
- 3 does not divide 7,
- the divisors of 3*7 are: 1, 3, 7, 21,
- the corresponding Hamming weights are: 1, 2, 3, 3,
- 2 does not divide 3*7,
- the divisors of 2*3*7 are: 1, 2, 3, 6, 7, 14, 21, 42,
- the corresponding Hamming weights are: 1, 1, 2, 2, 3, 3, 3, 3,
- they all divide 2*3*7,
- hence a(7) = 2*3*7 = 42.
MATHEMATICA
With[{s = Select[Range[3000], With[{k = #}, AllTrue[Divisors@ k, Mod[k, DigitCount[#, 2, 1]] == 0 &]] &]}, Table[SelectFirst[s, Mod[#, n] == 0 &] /. k_ /; MissingQ@ k -> -1, {n, 60}]] (* Michael De Vlieger, Mar 05 2019 *)
PROG
(PARI) a(n) = while (1, my (m=n); fordiv (m, d, m = lcm(m, hammingweight(d)); ); if (n==m, return (n), n = m))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 03 2019
STATUS
approved