This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A242869 Largest integer m < n having a binary expansion that is a prefix and a suffix of the binary expansion of n; a(0)=0. 5
 0, 0, 0, 1, 0, 1, 0, 3, 0, 1, 2, 1, 0, 1, 0, 7, 0, 1, 2, 1, 0, 5, 2, 1, 0, 1, 0, 3, 0, 1, 0, 15, 0, 1, 2, 1, 4, 1, 2, 1, 0, 1, 10, 1, 0, 5, 2, 1, 0, 1, 0, 3, 0, 1, 6, 3, 0, 1, 0, 3, 0, 1, 0, 31, 0, 1, 2, 1, 4, 1, 2, 1, 0, 9, 2, 1, 4, 1, 2, 1, 0, 1, 2, 1, 0, 21 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,8 COMMENTS The prefix and the suffix are allowed to overlap. a(n) <= A147755(n). a(2^n) = 0. a(2^n-1) = 2^(n-1)-1 for n>0. a(n) = 0 iff n in { A091065 }. a(n) > 1 iff n in { A091066 }. A029837(a(n)+1) = A091064(n). LINKS Alois P. Heinz, Table of n, a(n) for n = 0..8192 EXAMPLE a(91) = 11 because 91 = (1011)011_2 = 101(1011)_2 and 11 = 1011_2. a(84) = 0 because 84 = 1010100_2, only the empty bitstring is a proper prefix and suffix. MAPLE a:= proc(n) local m; m:=n;       while m>1 do m:= iquo(m, 2);         if m=irem(n, 2^(1+ilog2(m))) then return m fi       od; 0     end: seq(a(n), n=0..100); CROSSREFS Cf. A147755. Sequence in context: A097610 A161556 A317302 * A224878 A129555 A147755 Adjacent sequences:  A242866 A242867 A242868 * A242870 A242871 A242872 KEYWORD nonn,base,look AUTHOR Alois P. Heinz, May 24 2014 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.

Last modified December 6 16:24 EST 2019. Contains 329808 sequences. (Running on oeis4.)