This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A206923 #20 Jul 22 2025 19:48:34 %S A206923 1,1,2,1,3,1,3,1,2,1,4,1,2,1,4,1,2,1,1,1,1,1,4,1,2,1,1,1,1,1,4,1,2,1, %T A206923 1,1,3,1,1,1,1,1,2,1,1,1,5,1,2,1,1,1,3,1,1,1,1,1,2,1,1,1,5,1,2,1,1,1, %U A206923 1,1,1,1,1,1,1,1,3,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,5,1,2,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,2,1 %N A206923 Number of bisections of the n-th binary palindrome bit pattern until the result is not palindromic. %C A206923 Let k=1, p(1)=A006995(n) and m(1)=number of bits in p(1); if p(k) is a binary palindrome > 1 then iterate k=k+1, m(k)=floor((m(k-1)+1)/2), p(k)=leftmost m(k) bits of p(k-1); else set a(n)=k endif. %F A206923 Recursion: define f(x)=floor(A006995(x)/2^floor(floor(log_2(A006995(x))+1)/2)), for x=1,2,3,... %F A206923 Case 1: a(n)=1+a(A206915(f(n))), if f(n) is a binary palindrome; %F A206923 Case 2: a(n)=1, else. %F A206923 Formally: a(n)=if (A178225(f(n))==1) then a(A206915(f(n)))+1 else 1. %e A206923 a(1)=a(2)=1, since A006995(1)=0 and A006995(2)=1; %e A206923 a(5)=3, since A006995(5)=7=111_2 and so the iteration is 11==>11==>1; %e A206923 a(9)=2, since A006995(9)=21=10101_2 and so the iteration is 10101==>101; %e A206923 a(13)=2, since A006995(13)=45=101101_2 and so the iteration is 101101==>101; %e A206923 a(15)=4, since A006995(15)=63=111111_2 and so the iteration is 111111==>111==>11==>1; %e A206923 a(37)=3, since A006995(37)=341=101010101_2 and so the iteration is 101010101==>10101==>101; %o A206923 (C) %o A206923 /* quasi-C program fragment, omitting formal details, n>1 */ %o A206923 p=n; %o A206923 p1=n+1; %o A206923 k=0; %o A206923 while (A178225(p)==1) && (p != p1) %o A206923 { %o A206923 p1=p; %o A206923 k++; %o A206923 m=int(log(p)/log(2)); %o A206923 p=int(p/2^int((m+1)/2)); %o A206923 } %o A206923 return k; %Y A206923 A006995, A206915, A178225, A154809, A206924, A206925. %K A206923 nonn,base %O A206923 1,3 %A A206923 _Hieronymus Fischer_, Mar 12 2012