login
A175481
a(1)=1 and a(n+1) = Sum_{k=1..n} b(n,a(k)), where b(n,a(k)) is the largest positive integer that, when written in binary, occurs as a substring in both binary n and binary a(k).
1
1, 1, 2, 3, 5, 10, 11, 11, 13, 15, 36, 49, 42, 56, 54, 47, 42, 53, 52, 57, 112, 129, 131, 136, 163, 137, 183, 196, 198, 192, 162, 109, 218, 172, 275, 273, 151, 213, 196, 181, 343, 285, 367, 395, 437, 549, 389, 403, 524, 645, 409, 418, 568, 632, 608, 587, 719, 576, 570, 599, 565, 533, 393, 255, 595, 569, 565, 494, 984, 819
OFFSET
1,3
LINKS
PROG
(Python)
from itertools import count
def b(n, ak):
for x in count(0):
bx = bin(min(n, ak)-x)[2:]
if bx in bin(n)[2:] and bx in bin(ak)[2:]:
return(int(bx, 2)); break
def A175481_list(nmax):
A = [1]
for n in range(2, nmax+1):
A.append((sum(b(n-1, A[k-1]) for k in range(1, n))))
return(A) # John Tyler Rascoe, Dec 29 2023
CROSSREFS
Sequence in context: A286144 A038807 A094542 * A288244 A246392 A219860
KEYWORD
base,nonn
AUTHOR
Leroy Quet, May 26 2010
EXTENSIONS
More terms from Sean A. Irvine, Mar 02 2011
STATUS
approved