login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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 (list; graph; refs; listen; history; text; internal format)
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, 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
Sequence in context: A158285 A277994 A334112 * A286238 A286237 A059781
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Jul 10 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 28 03:10 EDT 2024. Contains 372020 sequences. (Running on oeis4.)