%I #24 Jun 08 2022 03:22:09
%S 1,3,5,17,25,39,57,69,145,201,257,265,289,291,323,393,579,1075,1083,
%T 2307,2645,2875,4205,4503,5555,5593,7955,8815,9399,9401,9519,11033,
%U 11155,11407,12297,12455,12711,12909,13205,13281,13611,13737,14001,14915,15879,16629
%N Numbers k whose ordered binary weights (A000120) of their divisors are the numbers 1 to A000005(k).
%C The subsequence of terms whose divisors have binary weights in order is A255401.
%C All terms are odd. Proof: All binary weights must be distinct but the binary weights of k and 2*k are equal. A contradiction. - _David A. Corneth_, Jun 04 2022
%H Amiram Eldar, <a href="/A354724/b354724.txt">Table of n, a(n) for n = 1..2475</a>
%e 3 is a term since its divisors, 1 and 3, have binary weights 1 and 2, respectively.
%e 69 is a term since its divisors, 1, 3, 23 and 69, have binary weights 1, 2, 4 and 3, respectively.
%t bw[n_] := DigitCount[n, 2, 1]; q[n_] := Module[{d = Divisors[n]}, Union[bw /@ d] == Range[Length[d]]]; Select[Range[1, 10^4, 2], q]
%o (Python)
%o from sympy import divisors
%o def binwt(n): return bin(n).count("1")
%o def ok(n):
%o if n%2 == 0: return False
%o binwts, divs = set(), 0
%o for d in divisors(n, generator=True):
%o b = binwt(d)
%o if b in binwts: return False
%o binwts.add(b)
%o divs += 1
%o return binwts == set(range(1, divs+1))
%o print([k for k in range(20000) if ok(k)]) # _Michael S. Branicky_, Jun 04 2022
%Y Cf. A000005, A000120, A354722.
%Y A255401 is a subsequence.
%K nonn,base
%O 1,2
%A _Amiram Eldar_, Jun 04 2022