OFFSET
1,2
COMMENTS
The subsequence of terms whose divisors have binary weights in order is A255401.
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
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..2475
EXAMPLE
3 is a term since its divisors, 1 and 3, have binary weights 1 and 2, respectively.
69 is a term since its divisors, 1, 3, 23 and 69, have binary weights 1, 2, 4 and 3, respectively.
MATHEMATICA
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]
PROG
(Python)
from sympy import divisors
def binwt(n): return bin(n).count("1")
def ok(n):
if n%2 == 0: return False
binwts, divs = set(), 0
for d in divisors(n, generator=True):
b = binwt(d)
if b in binwts: return False
binwts.add(b)
divs += 1
return binwts == set(range(1, divs+1))
print([k for k in range(20000) if ok(k)]) # Michael S. Branicky, Jun 04 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jun 04 2022
STATUS
approved