cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

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

Views

Author

Thomas Scheuerle, Oct 31 2022

Keywords

Comments

A permutation of the positive integers.
This permutation satisfies a weak ordering: If b = a(c*d) and e = a(c) and f = a(d) then b > e and b > f with c,d > 1.

Crossrefs

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.
Showing 1-1 of 1 results.