OFFSET
1,2
COMMENTS
A 1 is isolated if it's not adjacent to another 1.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
EXAMPLE
19 is a term because 19 = 10011_2 contains one isolated 1.
74 is a term because all ones in 74 = 1001010_2 are isolated.
MATHEMATICA
Select[Range[150], MemberQ[Split[IntegerDigits[#, 2]], {1}] &]
PROG
(Python)
from sympy import Matrix
def A377169(n):
def f(x):
s = bin(x)[-1:1:-1]
t = '0'+s+'0'
return n-1+sum((Matrix([[2, -1, 1], [1, 0, 0], [0, 1, 0]])**i*Matrix([1, 1, 0]))[0] for i in range(len(s)) if s[i]=='1' and not '010' in '0'+t[i+2:])+('010' not in t)
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m # Chai Wah Wu, Jun 10 2026
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo Xausa, Oct 18 2024
STATUS
approved
