|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
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"))
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|