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.

A380739 For n = 2^k (k>=0), a(n) = n. Otherwise a(n) != n is the smallest number not yet in the sequence having the same binary weight as n and such that gcd(n,a(n)) > 1.

Original entry on oeis.org

1, 2, 6, 4, 10, 3, 14, 8, 12, 5, 22, 9, 26, 7, 27, 16, 34, 20, 38, 18, 28, 11, 46, 33, 35, 13, 15, 21, 58, 39, 62, 32, 24, 17, 25, 40, 74, 19, 30, 36, 82, 44, 86, 42, 51, 23, 94, 66, 56, 52, 45, 50, 106, 57, 110, 49, 54, 29, 118, 75, 122, 31, 111, 64, 80, 48, 134
Offset: 1

Views

Author

David James Sycamore, Jan 31 2025

Keywords

Comments

Similar definition to A380728, conjectured to be a permutation of the natural numbers, with primes in order.

Crossrefs

Programs

  • Mathematica
    nn = 120; c[_] := False; u = 1;
    f[x_] := f[x] = DigitCount[x, 2, 1];
    Reap[Do[w = f[n]; k = u;
      If[w == 1,
        k = n,
        While[Or[c[k], CoprimeQ[k, n], w != f[k], k == n], k++]];
      Sow[k]; c[k] = True;
    If[k == u, While[c[u], u++]], {n, nn}] ][[-1, 1]] (* Michael De Vlieger, Feb 02 2025 *)

Formula

a(a(n)) = n for all n; p a prime implies a(p) = 2*p.
Showing 1-1 of 1 results.