A354724 Numbers k whose ordered binary weights (A000120) of their divisors are the numbers 1 to A000005(k).
1, 3, 5, 17, 25, 39, 57, 69, 145, 201, 257, 265, 289, 291, 323, 393, 579, 1075, 1083, 2307, 2645, 2875, 4205, 4503, 5555, 5593, 7955, 8815, 9399, 9401, 9519, 11033, 11155, 11407, 12297, 12455, 12711, 12909, 13205, 13281, 13611, 13737, 14001, 14915, 15879, 16629
Offset: 1
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..2475
Programs
-
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]
-
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
Comments