A255401 Numbers n with the property that its k-th smallest divisor, for all 1 <= k <= tau(n), contains exactly k "1" digits in its binary representation.
1, 3, 5, 17, 25, 39, 57, 201, 257, 289, 291, 323, 393, 579, 1083, 2307, 7955, 8815, 9399, 12297, 12909, 13737, 36867, 40521, 43797, 50349, 65537, 66049, 66291, 66531, 68457, 80457, 98313, 160329, 196617, 197633, 230691, 299559, 599079, 786441, 922179, 1278537
Offset: 1
Examples
The divisors of 1083, expressed in base 2 and listed in ascending order as 1, 11, 10011, 111001, 101101001, 10000111011, contain 1, 2, 3, 4, 5 and 6 "1" digits, respectively.
Links
- Jaroslav Krizek and Amiram Eldar, Table of n, a(n) for n = 1..50 (terms 1..45 from Jaroslav Krizek)
Programs
-
Magma
Set(Sort([n: n in [1..1000000] | [&+Intseq(d, 2): d in Divisors(n)] eq [1..NumberOfDivisors(n)]]))
-
Mathematica
Select[Range[10^6], Total @ IntegerDigits[#, 2] & /@ (d = Divisors[#]) == Range @ Length[d] &] (* Amiram Eldar, Dec 29 2019 *)
-
PARI
isok(n) = {my(d = divisors(n)); for (i=1, #d, if (hammingweight(d[i]) != i, return (0));); return (1);} \\ Michel Marcus, Feb 22 2015
Comments