The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A138033 a(n) = max_{ 1 <= i <= n-1 } min{ wt(i), wt(n-i) }, where wt() = A000120() is the binary weight function; a(1) = 0 by convention. 0

%I #3 Mar 30 2012 16:50:48

%S 0,1,1,1,1,2,1,2,2,2,2,2,2,3,2,2,2,3,2,3,3,3,2,3,3,3,3,3,3,4,2,3,3,3,

%T 3,3,3,4,3,3,3,4,3,4,4,4,3,3,3,4,3,4,4,4,3,4,4,4,4,4,4,5,3,3,3,4,3,4,

%U 4,4,3,4,4,4,4,4,4,5,3,4,4,4,4,4,4,5,4,4,4,5,4,5,5,5,3,4,4,4,4,4,4,5,4,4,4

%N a(n) = max_{ 1 <= i <= n-1 } min{ wt(i), wt(n-i) }, where wt() = A000120() is the binary weight function; a(1) = 0 by convention.

%F Records occur at a(2^(i+1) - 2) = i.

%F For i>0, a(2^i + 1) = floor((i+1)/2).

%e Suppose n=8. We consider:

%e i=1, min{wt(1), wt(7)} = min{1,3} = 1,

%e i=2, min{wt(2), wt(6)} = min{1,2} = 1,

%e i=3, min{wt(3), wt(5)} = min{2,2} = 2,

%e i=4, min{wt(4), wt(4)} = min{1,1} = 1,

%e and the maximal value is 2, so a(8) = 2.

%p (First load "wt" from A000120) f:=proc(n) local i,j,k; if n=1 then RETURN(0); fi; j:=0; for i from 1 to floor(n/2) do k := min( wt(i), wt(n-i) ); if k > j then j:=k; fi; od: RETURN(j); end;

%Y Cf. A000120.

%K nonn,easy

%O 1,6

%A _N. J. A. Sloane_, May 30 2008

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 12:26 EDT 2024. Contains 372600 sequences. (Running on oeis4.)