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.
LINKS
Hieronymus Fischer, Table of n, a(n) for n = 1..300
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.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Hieronymus Fischer, Jan 23 2013
STATUS
approved