OFFSET
1,5
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.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..10000
Scott R. Shannon, Image of the first 500000 terms. The green line is y = n.
EXAMPLE
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.
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Jul 10 2022
STATUS
approved