login
A217101
Minimal number such that the number of contiguous palindromic bit patterns in its binary representation is n, or 0, if there is no such number.
4
1, 2, 3, 4, 0, 7, 8, 18, 17, 15, 16, 42, 33, 68, 31, 32, 133, 65, 267, 130, 63, 64, 260, 129, 341, 258, 447, 127, 128, 682, 257, 1040, 514, 895, 1029, 255, 256, 1919, 513, 2056, 1026, 1791, 2053, 2052, 511, 512, 5376, 1025, 5461, 2050, 3583, 4101, 4100, 8203, 1023, 1024, 8200
OFFSET
1,2
COMMENTS
The set of numbers which have n contiguous palindromic bit patterns (in their binary representation) is not empty, provided n<>5. Proof: For even n we have A206925(A206927(n/2)) = 2*(n/2) = n. For n=1,3,7,9 we get A206925(k)=n if we set k=1,3,8,17. For odd n>10 we define b(n) := 14*2^((n-9)/2)+A206927((n-9)/2). The b(n) have the binary expansion 11110, 111100, 1111001, 11110010, 111100101, 1111001011, 11110010110, 111100101100, 1111001011001, 11110010110010, 111100101100101, ..., for n=11, 13, 15, 17, ... . Evidently, b(n) is constructed by the concatenation of 111 with repeated bit patterns of 100101 (=37) truncated to 4+(n-9)/2 digits. As a result, the number of contiguous palindromic bit patterns of b(n) is A206925(111_2) + 3 + A206925(A206927((n-9)/2)) = 6 + 3 + n - 9 = n. This proves that there is always a number with n contiguous palindromic bit patterns.
a(5)=0, and this is the only zero term. Proof: The inequality A206925(n) >= 2*floor(log_2(n)) (cf. A206925) implies A206925(n) > 5 for n >= 8. By direct search we find A206925(n)<>5 for n=1..7. Thus, there is no k with A206925(k)=5, which implies a(5)=0.
LINKS
FORMULA
a(n) = min(k | A206925(k) = n), for n<>5.
A206925(a(n)) = n, n<>5.
a(n) <= A217100(n), equality holds for n = 1, 2, 3 and 5, only.
a(A000217(n)) = 2^n - 1.
a(A000217(n)+1) = 2^n.
a(A000217(n)+3) = 2^(n+1)+1, n>2.
a(A000217(n)+5) = 2^(n+2)+2, n>4.
a(A000217(n)+6) = 2^(n+3) - 2^n - 1, n>5.
a(A000217(n)+7) = 2^(n+3)+5, n>6.
a(A000217(n)+8) = 2^(n+3)+4, n>7.
a(A000217(n)+9) = 2^(n+4)+11, n>8.
a(A000217(n)+10) = 2^(n+4) - 2^n - 1, n>9.
a(A000217(n)+11) = 21*2^n, n>10.
a(A000217(n)+12) = 2^(n+4)+8, n>11.
a(A000217(n)+13) = 2^(n+5)+18, n>12.
EXAMPLE
a(3) = 3, since 3=11_2 has 3 contiguous palindromic bit patterns, and this is the least such number.
a(6) = 7. Since 7=111_2 has 6 contiguous palindromic bit patterns, and this is the least such number.
a(8) = 18. Since 18=10010_2 has 8 contiguous palindromic bit patterns (1, 0, 0, 1, 0, 00, 010 and 1001), and this is the least such number.
a(9) = 17. Since 17=10001_2 has 9 contiguous palindromic bit patterns (1, 0, 0, 0, 1, 00, 00, 000, and 10001), and this is the least such number.
KEYWORD
nonn,base
AUTHOR
Hieronymus Fischer, Jan 23 2013
STATUS
approved