A217100 Greatest number such that the number of contiguous palindromic bit patterns in its binary representation is n, or 0, if there is no such number.
1, 2, 3, 6, 0, 13, 14, 26, 29, 52, 58, 105, 116, 211, 233, 422, 467, 845, 934, 1690, 1869, 3380, 3738, 6761, 7476, 13523, 14953, 27046, 29907, 54093, 59814, 108186, 119629, 216372, 239258, 432745, 478516, 865491, 957033, 1730982, 1914067, 3461965, 3828134
Offset: 1
Examples
a(3)=3, since 3=11_2 has 3 contiguous palindromic bit patterns, and this is the greatest such number. a(6)=13. Since 13=1101_2 has 6 contiguous palindromic bit patterns, and this is the greatest such number. a(8)=26. Since 26=11010_2 has 8 contiguous palindromic bit patterns (1, 1, 0, 1, 0, 11, 101 and 010), and this is the greatest such number. a(9)=27. Since 17=11011_2 has 9 contiguous palindromic bit patterns (1, 1, 0, 1, 1, 11, 11, 101 and 11011), and this is the greatest such number.
Links
- Hieronymus Fischer, Table of n, a(n) for n = 1..1000
Formula
a(n) = max(k | A206925(k) = n), for n<>5.
A206925(a(n)) = n, n<>5.
a(n) => A217101(n), equality holds for n = 1, 2, 3 and 5, only.
Iteration formula:
a(n+2) = 2*a(n) + floor(52*2^floor((n+4-(-1)^n)/2)/63) mod 2, n>5.
a(n+2) = 2*a(n) + floor(52*2^((2*n+7-3*(-1)^n)/4)/63) mod 2, n>5.
Direct calculation formula:
a(n) = floor(52*2^floor((n+1+(-1)^n)/2)/63) mod 2^floor((n+1+(-1)^n)/2)) + (1-(-1)^n)*2^floor((n-2)/2)), for n>5.
a(n) = floor(52*2^((2*n + 1 + 3*(-1)^n)/4)/63) + (1-(-1)^n)*2^((2*n - 5 + (-1)^n)/4), for n>5.
a(2k) = A206926(6k-9), k>2.
G.f.: x*(1 +2*x +x^2 +2*x^3 -6*x^4 +x^5 +14*x^6 +x^8 +x^11 -x^12 -x^13 -2*x^15 +7*x^16 -14*x^18)/((1-2*x^2)*(1-x^3)*(1+x^3)*(1+x^6)); also:
x*(1 -x +3*x^2 +x*(3+14*x^5)/(1-2*x^2) +x^5*(1+x^3)*(1+x^6+x^8)/((1-2*x^2)*(1-x^12))).
Comments