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.

A355625 a(1) = 1; for n > 1, a(n) is the number of terms in the first n-1 terms of the sequence that share a 1-bit with n in their binary expansions.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 4, 0, 3, 2, 6, 2, 6, 7, 11, 0, 6, 9, 13, 6, 13, 13, 18, 6, 11, 17, 21, 16, 21, 22, 26, 0, 14, 16, 26, 14, 23, 25, 31, 12, 22, 27, 34, 27, 33, 34, 39, 19, 31, 35, 43, 36, 44, 44, 49, 36, 42, 48, 52, 47, 52, 53, 57, 0, 29, 32, 48, 30, 48, 48, 57, 25, 41, 46, 56, 47, 57, 58, 65, 34
Offset: 1

Views

Author

Scott R. Shannon, Jul 10 2022

Keywords

Comments

The indices where a(n) = 1 in the first 500000 terms are 1, 3, 6. It is likely no more exist although this is unknown. Many terms of the sequence are close to the line a(n) = n although only the first term is a possible fixed point. In the first 500000 terms the lowest values not to appear are 5, 8, 10, 15, 20, 24, 28. It is likely these and other numbers never appear although this is unknown. All terms for n > 1 where n is a power of 2 equal 0.

Examples

			a(7) = 4 as the total number of terms in the first six terms that share a 1-bit with 7 in their binary expansions is four, namely 1, 1, 2, 1.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen():
        an, alst = 1, [1]
        for n in count(2):
            yield an
            an = sum(1 for k in alst if k&n)
            alst.append(an)
    print(list(islice(agen(), 80))) # Michael S. Branicky, Jul 10 2022