login
A147761
a(n) is the smallest positive integer m with exactly n zeros in its binary representation and with n represented in binary as a substring of the binary representation of m.
3
2, 4, 24, 16, 80, 192, 896, 256, 1152, 2560, 11264, 12288, 53248, 114688, 491520, 65536, 278528, 589824, 2490368, 2621440, 11010048, 23068672, 96468992, 50331648, 209715200, 436207616, 1811939328, 1879048192, 7784628224, 16106127360, 66571993088, 4294967296
OFFSET
1,1
COMMENTS
a(3315) has 1001 digits. - Michael S. Branicky, Feb 18 2023
LINKS
FORMULA
a(n) = n*2^(n-A023416(n)). - Michael S. Branicky, Feb 18 2023
EXAMPLE
5 represented in binary is 101. 80 represented in binary is 1010000, which contains exactly five 0's and 101 as a substring ({101}0000). Since 80 is the smallest positive integer that satisfies the conditions, then a(5) = 80.
PROG
(Python)
def a(n): b = bin(n)[2:]; return n << (n - b.count("0"))
print([a(n) for n in range(1, 33)]) # Michael S. Branicky, Feb 18 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Nov 11 2008
EXTENSIONS
Extended by Ray Chandler, Nov 15 2008
a(30) and beyond from Michael S. Branicky, Feb 18 2023
STATUS
approved