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.

A292601 a(n) = n - A292600(n).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 4, 5, 1, 2, 4, 5, 8, 9, 9, 10, 1, 2, 4, 5, 8, 9, 9, 10, 16, 17, 17, 18, 17, 18, 20, 21, 1, 2, 4, 5, 8, 9, 9, 10, 16, 17, 17, 18, 17, 18, 20, 21, 32, 33, 33, 34, 33, 34, 36, 37, 33, 34, 36, 37, 40, 41, 41, 42, 1, 2, 4, 5, 8, 9, 9, 10, 16, 17, 17, 18, 17, 18, 20, 21, 32, 33, 33, 34, 33, 34, 36, 37, 33, 34, 36, 37, 40, 41, 41, 42, 64, 65, 65
Offset: 0

Views

Author

Antti Karttunen, Sep 21 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n - If[n < 2, 0, BitXor @@ Table[Floor[#/2^m], {m, 0, Floor@ Log2@ #}] &@ Floor[n/2]], {n, 0, 98}] (* Michael De Vlieger, Sep 21 2017 *)
  • Python
    def A292601(n):
        k, m = n>>1, n>>2
        while m > 0:
            k ^= m
            m >>= 1
        return n-k # Chai Wah Wu, Jun 30 2022

Formula

a(n) = n - A292600(n) = n - A006068(floor(n/2)).