A358139 Numbers k > 0 sorted by k/A000120(k) in increasing order. A000120 is the binary weight of k. If k/A000120(k) yields equal values, the smaller k will appear first.
1, 3, 2, 7, 5, 6, 11, 15, 4, 13, 9, 14, 10, 23, 12, 31, 19, 27, 21, 29, 22, 30, 8, 25, 17, 26, 18, 28, 47, 39, 20, 63, 43, 55, 45, 46, 35, 59, 24, 61, 37, 62, 38, 51, 53, 54, 41, 42, 57, 58, 44, 60, 79, 95, 16, 49, 33, 50, 34, 52, 87, 71, 36, 127, 91, 111, 93, 56
Offset: 1
Links
Programs
-
PARI
f(x) = x/hammingweight(x); cmpb(x, y) = my(hx=f(x), hy=f(y)); if (hx != hy, return(sign(hx-hy))); return(sign(x-y)); lista(nn) = Vec(vecsort([1..2*nn], cmpb, 1), nn); \\ Michel Marcus, Nov 05 2022
Formula
a(2^n) = 2^(n+1) - 1.
abs(a(n)-n) < n.
Comments