login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A206923 Number of bisections of the n-th binary palindrome bit pattern until the result is not palindromic 9
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

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.

LINKS

Table of n, a(n) for n=1..116.

FORMULA

Recursion: define f(x)=floor(A006995(x)/2^floor(floor(log_2(A006995(x))+1)/2)), for x=1,2,3,...

  Case 1: a(n)=1+a(A206915(f(n))), if f(n) is a binary palindrome;

  Case 2: a(n)=1, else.

Formally: a(n)=if (A178225(f(n))==1) then a(A206915(f(n)))+1 else 1.

EXAMPLE

a(1)=a(2)=1, since A006995(1)=0 and A006995(2)=1;

a(5)=3, since A006995(5)=7=111_2 and so the iteration is 11==>11==>1;

a(9)=2, since A006995(9)=21=10101_2 and so the iteration is 10101==>101;

a(13)=2, since A006995(13)=45=101101_2 and so the iteration is 101101==>101;

a(15)=4, since A006995(15)=63=111111_2 and so the iteration is 111111==>111==>11==>1;

a(37)=3, since A006995(37)=341=101010101_2 and so the iteration is 101010101==>10101==>101;

PROG

/* quasi-C program fragment, omitting formal details, n>1 */

p=n;

p1=n+1;

k=0;

While (A178225(p)==1) And (p != p1)

{

  p1=p;

  k++;

  m=int(log(p)/log(2));

  p=int(p/2^int((m+1)/2));

}

return k;

CROSSREFS

A006995, A206915, A178225, A154809, A206924, A206925.

Sequence in context: A278572 A136644 A111963 * A078079 A176982 A079728

Adjacent sequences:  A206920 A206921 A206922 * A206924 A206925 A206926

KEYWORD

nonn,base

AUTHOR

Hieronymus Fischer, Mar 12 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 10:39 EDT 2019. Contains 322255 sequences. (Running on oeis4.)