cp's OEIS Frontend

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.

A327193 For any n >= 0: consider the different ways to split the binary representation of n into two (possibly empty) parts, say with value x and y; a(n) is the greatest possible value of min(x, y).

This page as a plain text file.
%I A327193 #12 Aug 26 2019 14:26:04
%S A327193 0,0,0,1,0,1,1,1,0,1,2,2,1,1,2,3,0,1,2,3,2,2,2,3,1,1,2,3,3,3,3,3,0,1,
%T A327193 2,3,4,4,4,4,2,2,2,3,4,5,5,5,1,1,2,3,4,5,6,6,3,3,3,3,4,5,6,7,0,1,2,3,
%U A327193 4,5,6,7,4,4,4,4,4,5,6,7,2,2,2,3,4,5,6
%N A327193 For any n >= 0: consider the different ways to split the binary representation of n into two (possibly empty) parts, say with value x and y; a(n) is the greatest possible value of min(x, y).
%H A327193 Rémy Sigrist, <a href="/A327193/b327193.txt">Table of n, a(n) for n = 0..8192</a>
%F A327193 a(n) = 0 iff n = 0 or n is a power of 2.
%e A327193 For n=42:
%e A327193 - the binary representation of 42 is "101010",
%e A327193 - there are 7 ways to split it:
%e A327193    - "" and "101010": x=0 and y=42: min(0, 42) = 0,
%e A327193    - "1" and "01010": x=1 and y=10: min(1, 10) = 1,
%e A327193    - "10" and "1010": x=2 and y=10: min(2, 10) = 2,
%e A327193    - "101" and "010": x=5 and y=2: min(5, 2) = 2,
%e A327193    - "1010" and "10": x=10 and y=2: min(10, 2) = 2,
%e A327193    - "10101" and "0": x=21 and y=0: min(21, 0) = 0,
%e A327193    - "101010" and "": x=42 and y=0: min(42, 0) = 0,
%e A327193 - hence a(42) = 2.
%o A327193 (PARI) a(n) = my (v=-oo, b=binary(n)); for (w=0, #b, v=max(v, min(fromdigits(b[1..w],2), fromdigits(b[w+1..#b],2)))); v
%Y A327193 See A327186 for other variants.
%K A327193 nonn,look,base
%O A327193 0,11
%A A327193 _Rémy Sigrist_, Aug 25 2019