A206926 Numbers such that the number of contiguous palindromic bit patterns in their binary representation is minimal (for a given number of places).
2, 4, 5, 6, 9, 10, 11, 12, 13, 18, 19, 20, 22, 25, 26, 37, 38, 41, 44, 50, 52, 75, 77, 83, 89, 101, 105, 150, 154, 166, 178, 203, 211, 300, 308, 333, 357, 406, 422, 601, 617, 666, 715, 812, 845, 1202, 1235, 1332, 1430, 1625, 1690, 2405, 2470, 2665, 2860, 3250
Offset: 1
Examples
a(2)=4=100_2 has 4 [=A206925(4)] contiguous palindromic bit patterns, this is the minimum value for binary numbers with 3 places. The other numbers with 3 places which meet that minimum value of 4 are 5 and 6. a(7)=11=1011_2 has 6 [=A206925(11)] contiguous palindromic bit patterns, this is the minimum value for binary numbers with 4 places. The other numbers with 4 places which meet that minimum value of 6 are 9, 10, 12 and 13. Examples to demonstrate the concatenation rule: a(4) = 6 = 110_2 = (110010_2 truncated to 3 digits) = (50 truncated to 3 binary digits). a(35) = 308 = 100110100_2 = (concatenation(100110, 100110) truncated to 9 digits) = (concatenation(38, 38) truncated to 9 binary digits). a(94) = 307915 = 1001011001011001011_2 = (concatenation(101001, 101001, 101001, 101001) truncated to 19 digits) = (concatenation(41, 41, 41, 41) truncated to 19 binary digits).
Links
- Hieronymus Fischer, Table of n, a(n) for n = 1..2000
Programs
-
Smalltalk
A206926 "Calculates a(n)" | k j p q pArray qArray B n s | n := self. pArray := #(5 1 5 2 4 4). qArray := #(-1 1 1 -1 -1 1). B := #(2 4 5 6 9 10 11 12 13 18 19 20 22 25 26). n < 10 ifTrue: [^s := B at: n]. k := (n - 4) // 6. j := (n - 4) \\ 6 + 1. p := pArray at: j. q := qArray at: j. s := (2 * q + 39) * (2 raisedToInteger: k + p + 5) // 63 \\ (2 raisedToInteger: k + 4). ^s [by Hieronymus Fischer]
Formula
a(n) = min(k > a(n-1) | A206925(k) = A206925(a(n-1))), if this minimum exists, else a(n) = min(k >= 2*2^floor(log(a(n-1))) | A206925(k) = min(A206925(j) | j >= 2*2^floor(log(a(n-1)))).
A206925(a(n)) = 2*floor(log_2(a(n))).
A070939(a(n)) = 4 + floor((n-4)/6), for n>4.
A206925(a(n)) = 6 + 2*floor((n-4)/6), for n>4.
Iteration formulas for k>0:
a(6(k+1)+4) = 2a(6k+4) + floor(37*2^(k+5)/63) mod 2.
a(6(k+1)+5) = 2a(6k+5) + floor(41*2^(k+1)/63) mod 2.
a(6(k+1)+6) = 2a(6k+6) + floor(41*2^(k+5)/63) mod 2.
a(6(k+1)+7) = 2a(6k+7) + floor(37*2^(k+2)/63) mod 2.
a(6(k+1)+8) = 2a(6k+8) + floor(37*2^(k+4)/63) mod 2.
a(6(k+1)+9) = 2a(6k+9) + floor(41*2^(k+4)/63) mod 2.
Calculation formulas for k>0:
a(6k+4) = floor((37*2^(k+4)/63) mod 2^(k+4).
a(6k+5) = floor((41*2^(k+6)/63) mod 2^(k+4).
a(6k+6) = floor((41*2^(k+4)/63) mod 2^(k+4).
a(6k+7) = floor((37*2^(k+7)/63) mod 2^(k+4).
a(6k+8) = floor((37*2^(k+9)/63) mod 2^(k+4).
a(6k+9) = floor((41*2^(k+9)/63) mod 2^(k+4).
With q(i) = 1 - 2*(floor((i+5)/6) - floor((i+4)/6) + floor((i+2)/6) + floor(i/6)),
this means q(i) = -1, 1, 1, -1, -1, 1, for i = 1..6,
p(i) = - 4 + 9*floor((i+5)/6) - 4*floor((i+4)/6) + 4*floor((i+3)/6) - 3*floor((i+2)/6)) + 2*floor((i+1)/6)),
this means p(i) = 5, 1, 5, 2, 4, 4, for i = 1..6,
k := k(n) = floor((n-4)/6),
j := j(n) = 1 + (n-4) mod 6,
we get the following formulas:
a(n+6) = 2*a(n) + floor((39+2*q(j))*2^(k+p(j))/63) mod 2, for n>9.
a(n+6) = 2*a(n) + b(k(n),j(n)), for n>9,
where b(k,j) is the 6x6-matrix:
(1 0 1 0 0 0)
(1 1 1 1 1 1)
(0 0 0 0 1 1)
(0 0 1 1 0 0)
(1 1 0 0 1 0)
(1 0 1 0 0 0).
a(n) = floor((39+2*q(j(n)))*2^(k(n)+p(j(n))+5)/63) mod 2^(k(n)+4), for n>4.
a(n) = (floor((39+2*q(j))*2^(6+p(j))/63) mod 32) * 2^(k-1) + (floor((39+2*q(j))*2^(6+p(j))/63) mod 64) * 2^(k mod 6 -1)*(2^(6*floor(k/6)) - 1)/63 + sum_{i=1..(k mod 6 - 1)} 2^(k mod 6 - 1 - i)*(floor((39+2*q(j))*2^(p(j)+i)/63) mod 2), for n>9.
a(n) = floor((39+2*q(j(n)))*2^(p(j(n))+floor((n+26)/6))/63) mod 2^floor((n+20)/6)), for n>4.
With: b(i) = floor((39+2*q(i))*2^(6+p(i))/63) mod 32, this means b(i) = 18, 19, 20, 22, 25, 26, for i = 1..6,
c(i) = (floor((39+2*q(i))*2^(6+p(i))/63) mod 64. This means c(i) = 50, 19, 52, 22, 25, 26, for i = 1..6:
a(n) = b(j)* 2^(k-1) + c(j)*2^(k mod 6 -1)*(2^(6*floor(k/6)) - 1)/63 + sum_{i=1..(k mod 6 - 1)} 2^(k mod 6 - 1 - i)*(floor(c(j)*2^i/63) mod 2), for n>9.
a(n) = floor(16*c(j)*2^floor((n+2)/6)/63) mod (8*2^floor((n+2)/6))), for n>4.
Asymptotic behavior:
a(n) = O(2^(n/6)).
lim inf a(n)/2^floor((n+2)/6) = 8*37/63 = 4.698412….
lim sup a(n)/2^floor((n+2)/6) = 8*52/63 = 6.603174….
lim inf a(n)/2^(n/6) = sqrt(2)*4*52/63 = 4.66914953….
lim sup a(n)/2^(n/6) = 2^(1/3)*8*37/63 = 5.91962906….
G.f. g(x) = x*(2 + 4x + 5x^2 + 6x^3 + 9x^4 + 10x^5 + 7x^6 + 3x^8 + 6x^9 + x^10 + x^13)/(1-2x^6) + (x^16*(1+x^2)(1+x^27) + x^22*(1-x^6)/(1-x) + x^32*(1-x^12)/((1-x^2)(1-x)) + x^47*(1+x^3)/(1-x))/(1-x^36).
Also: g(x) = x*(2 + 5x*(1-x^40) + 4x^2*(1+x^2+x^3-x^6-x^36-x^38-x^42)+ 2x^3*(1-x^3+x^6-x^7+x^39+x^43) - 6x^7*(1+x^4+x^38-x^40) - x^12*(1-x+x^7-x^8-x^10+x^15+x^16+x^18-x^20-x^23-x^24) - 3x^37*(1-x^6))/((1-x)(1+x^2)(1-x^9)(1+x^9)(1+x^18)).
Comments