OFFSET
1,3
COMMENTS
The indices where a(n) = 1 in the first 500000 terms are 1, 2, 4, 11, 68, 131, 2051, 4099. It is unknown if more exist. 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 7, 9, 14, 25, 26. It is likely these and other numbers never appear although this is unknown.
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) = 5 as a(6) = 5 and the total number of terms in the first six terms that share a 1-bit with 5 in their binary expansions is five, namely 1, 1, 1, 3, 5.
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&an)
alst.append(an)
print(list(islice(agen(), 79))) # Michael S. Branicky, Jul 10 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Jul 10 2022
STATUS
approved